summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade our copy of clang and llvm to 3.6.1 release.dim2015-05-257-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | This release contains the following cherry-picked revisions from upstream trunk: 226124 226151 226164 226165 226166 226407 226408 226409 226652 226905 226983 227084 227087 227089 227208 227209 227210 227211 227212 227213 227214 227269 227430 227482 227503 227519 227574 227822 227986 227987 227988 227989 227990 228037 228038 228039 228040 228188 228189 228190 228273 228372 228373 228374 228403 228765 228848 228918 229223 229225 229226 229227 229228 229230 229234 229235 229236 229238 229239 229413 229507 229680 229750 229751 229752 229911 230146 230147 230235 230253 230255 230469 230500 230564 230603 230657 230742 230748 230956 231219 231237 231245 231259 231280 231451 231563 231601 231658 231659 231662 231984 231986 232046 232085 232142 232176 232179 232189 232382 232386 232389 232425 232438 232443 232675 232786 232797 232943 232957 233075 233080 233351 233353 233409 233410 233508 233584 233819 233904 234629 234636 234891 234975 234977 235524 235641 235662 235931 236099 236306 236307 Please note that from 3.5.0 onwards, clang and llvm require C++11 support to build; see UPDATING for more information.
* Pull in r230348 from upstream llvm trunk (by Tim Northover):dim2015-03-231-8/+7
| | | | | | | | | | | | | | | | | ARM: treat [N x i32] and [N x i64] as AAPCS composite types The logic is almost there already, with our special homogeneous aggregate handling. Tweaking it like this allows front-ends to emit AAPCS compliant code without ever having to count registers or add discarded padding arguments. Only arrays of i32 and i64 are needed to model AAPCS rules, but I decided to apply the logic to all integer arrays for more consistency. This fixes a possible "Unexpected member type for HA" error when compiling lib/msun/bsdsrc/b_tgamma.c for armv6. Reported by: Jakub Palider <jpa@semihalf.com>
* Merge llvm 3.6.0rc4 from ^/vendor/llvm/dist, merge clang 3.6.0rc4 fromdim2015-02-196-37/+86
| | | | ^/vendor/clang/dist, resolve conflicts, and update patches.
* Merge llvm 3.6.0rc3 from ^/vendor/llvm/dist, merge clang 3.6.0rc3 fromdim2015-02-1411-295/+35
| | | | ^/vendor/clang/dist, resolve conflicts, and update patches README.
* Pull in r227752 from upstream llvm trunk (by Michael Kuperstein):dim2015-02-022-8/+17
| | | | | | | | | | | | | | | | | [X86] Convert esp-relative movs of function arguments to pushes, step 2 This moves the transformation introduced in r223757 into a separate MI pass. This allows it to cover many more cases (not only cases where there must be a reserved call frame), and perform rudimentary call folding. It still doesn't have a heuristic, so it is enabled only for optsize/minsize, with stack alignment <= 8, where it ought to be a fairly clear win. (Re-commit of r227728) Differential Revision: http://reviews.llvm.org/D6789 This helps to get sys/boot/i386/boot2 below the required size again, when optimizing with -Oz.
* Merge llvm 3.6.0rc2 from ^/vendor/llvm/dist, merge clang 3.6.0rc2 fromdim2015-01-312-16/+19
| | | | ^/vendor/clang/dist, resolve conflicts, and cleanup patches.
* Merge llvm 3.6.0rc1 from ^/vendor/llvm/dist, merge clang 3.6.0rc1 fromdim2015-01-25188-9347/+17195
| | | | ^/vendor/clang/dist, resolve conflicts, and cleanup patches.
* Merge llvm 3.5.0 release from ^/vendor/llvm/dist, resolve conflicts, anddim2014-11-24184-11453/+23076
| | | | preserve our customizations, where necessary.
* The fix imported into llvm in r274442 contains some C++11 constructs,dim2014-11-131-2/+2
| | | | | | | | | | | which gcc in base cannot handle. Replace these with C++98 equivalents. While here, add the patch for the adapted fix. Reported by: bz, kib Pointy hat to: dim MFC after: 1 week X-MFC-With: r274442
* Pull in r221709 from upstream llvm trunk (by Frédéric Riss):dim2014-11-121-4/+12
| | | | | | | | | | | | | | | | | | | | | | | Totally forget deallocated SDNodes in SDDbgInfo. What would happen before that commit is that the SDDbgValues associated with a deallocated SDNode would be marked Invalidated, but SDDbgInfo would keep a map entry keyed by the SDNode pointer pointing to this list of invalidated SDDbgNodes. As the memory gets reused, the list might get wrongly associated with another new SDNode. As the SDDbgValues are cloned when they are transfered, this can lead to an exponential number of SDDbgValues being produced during DAGCombine like in http://llvm.org/bugs/show_bug.cgi?id=20893 Note that the previous behavior wasn't really buggy as the invalidation made sure that the SDDbgValues won't be used. This commit can be considered a memory optimization and as such is really hard to validate in a unit-test. This should fix abnormally large memory usage and resulting OOM crashes when compiling certain ports with debug information. Reported by: Dmitry Marakasov <amdmi3@amdmi3.ru> Upstream PRs: http://llvm.org/PR19031 http://llvm.org/PR20893 MFC after: 1 week
* Pull in r211435 from upstream llvm trunk (by Benjamin Kramer):dim2014-06-212-0/+39
| | | | | | | | | | | | | | | | | Legalizer: Add support for splitting insert_subvectors. We handle this by spilling the whole thing to the stack and doing the insertion as a store. PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is enabled. This fixes a "fatal error: error in backend: Do not know how to split the result of this operator!" message encountered during compilation of the net-p2p/libtorrent-rasterbar port. Reported by: Evgeniy <iron@mail.ua> MFC after: 3 days
* Upgrade our copy of llvm/clang to 3.4.1 release. This release containsdim2014-05-124-5/+15
| | | | | | | | | | | | | | | mostly fixes, for the following upstream bugs: http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000 http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165 http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316 http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515 http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762 http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994 http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033 http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326 MFC after: 2 weeks
* Merge LLVM r202188:emaste2014-04-233-28/+50
| | | | | | | | | | | | | | | | | | | | Debug info: Support variadic functions. Variadic functions have an unspecified parameter tag after the last argument. In IR this is represented as an unspecified parameter in the subroutine type. Paired commit with CFE r202185. rdar://problem/13690847 This re-applies r202184 + a bugfix in DwarfDebug's argument handling. This merge includes a change to use the LLVM 3.4 API in lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp: DwarfUnit -> CompileUnit Sponsored by: DARPA, AFRL
* Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):dim2014-03-181-0/+11
| | | | | | | | | | | | | | | | | | | | ISel: Make VSELECT selection terminate in cases where the condition type has to be split and the result type widened. When the condition of a vselect has to be split it makes no sense widening the vselect and thereby widening the condition. We end up in an endless loop of widening (vselect result type) and splitting (condition mask type) doing this. Instead, split both the condition and the vselect and widen the result. I ran this over the test suite with i686 and mattr=+sse and saw no regressions. Fixes PR18036. With this fix the original problem case from the graphics/rawtherapee port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS. Reported by: mandree MFC after: 1 week
* Pull in r196939 from upstream llvm trunk (by Reid Kleckner):dim2014-03-184-12/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reland "Fix miscompile of MS inline assembly with stack realignment" This re-lands commit r196876, which was reverted in r196879. The tests have been fixed to pass on platforms with a stack alignment larger than 4. Update to clang side tests will land shortly. Pull in r196986 from upstream llvm trunk (by Reid Kleckner): Revert the backend fatal error from r196939 The combination of inline asm, stack realignment, and dynamic allocas turns out to be too common to reject out of hand. ASan inserts empy inline asm fragments and uses aligned allocas. Compiling any trivial function containing a dynamic alloca with ASan is enough to trigger the check. XFAIL the test cases that would be miscompiled and add one that uses the relevant functionality. Pull in r202930 from upstream llvm trunk (by Hans Wennborg): Check for dynamic allocas and inline asm that clobbers sp before building selection dag (PR19012) In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo to make sure that ESI isn't used as a base pointer register before we choose to emit rep movs (which clobbers esi). The problem is that MachineFrameInfo wouldn't know about dynamic allocas or inline asm that clobbers the stack pointer until SelectionDAGBuilder has encountered them. This patch fixes the problem by checking for such things when building the FunctionLoweringInfo. Differential Revision: http://llvm-reviews.chandlerc.com/D2954 Together, these commits fix the problem encountered in the devel/emacs port on the i386 architecture, where a combination of stack realignment, alloca() and memcpy() could incidentally clobber the %esi register, leading to segfaults in the temacs build-time utility. See also: http://llvm.org/PR18171 and http://llvm.org/PR19012 Reported by: ashish PR: ports/183064 MFC after: 1 week
* Import a whole bunch of llvm trunk commits to enable self-hosting clangdim2014-02-202-11/+20
| | | | | | | | | | | | | | 3.4 on Sparc64 (commit descriptions left out for brevity): r196755 r198028 r198029 r198030 r198145 r198149 r198157 r198565 r199186 r199187 r198280 r198281 r198286 r198480 r198484 r198533 r198567 r198580 r198591 r198592 r198658 r198681 r198738 r198739 r198740 r198893 r198909 r198910 r199014 r199024 r199028 r199031 r199033 r199061 r199775 r199781 r199786 r199940 r199974 r199975 r199977 r200103 r200104 r200112 r200130 r200131 r200141 r200282 r200368 r200373 r200376 r200509 r200617 r200960 r200961 r200962 r200963 r200965 Submitted by: rdivacky
* Upgrade our copy of llvm/clang to 3.4 release. This version supportsdim2014-02-16129-10275/+14314
| | | | | | | | | | | | | | | | | all of the features in the current working draft of the upcoming C++ standard, provisionally named C++1y. The code generator's performance is greatly increased, and the loop auto-vectorizer is now enabled at -Os and -O2 in addition to -O3. The PowerPC backend has made several major improvements to code generation quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ backends have all seen major feature work. Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.4/docs/ReleaseNotes.html> <http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html> MFC after: 1 month
* Pull in r186338 from upstream llvm trunk:dim2013-10-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Remove invalid assert in DAGTypeLegalizer::RemapValue There is a comment at the top of DAGTypeLegalizer::PerformExpensiveChecks which, in part, says: // Note that these invariants may not hold momentarily when processing a node: // the node being processed may be put in a map before being marked Processed. Unfortunately, this assert would be valid only if the above-mentioned invariant held unconditionally. This was causing llc to assert when, in fact, everything was fine. Thanks to Richard Sandiford for investigating this issue! Fixes PR16562. This fixes assertions which could occur in the multimedia/ffmpeg1 and multimedia/ffmpeg2 ports. Approved by: re (hrs) Reported by: Matthias Apitz <guru@unixarea.de> MFC after: 3 days
* Pull in r191165 from upstream llvm trunk:dim2013-09-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | ISelDAG: spot chain cycles involving MachineNodes Previously, the DAGISel function WalkChainUsers was spotting that it had entered already-selected territory by whether a node was a MachineNode (amongst other things). Since it's fairly common practice to insert MachineNodes during ISelLowering, this was not the correct check. Looking around, it seems that other nodes get their NodeId set to -1 upon selection, so this makes sure the same thing happens to all MachineNodes and uses that characteristic to determine whether we should stop looking for a loop during selection. This should fix PR15840. Specifically, this fixes the long-standing assertion failure when compiling the multimedia/gstreamer port on i386. Thanks to Tijl Coosemans for his help in getting upstream to fix it. Approved by: re (marius)
* Pull in r185616 from llvm trunk:dim2013-07-081-8/+5
| | | | | | | | | | | | | | | | | FastISel can only append to basic blocks. Compute the insertion point from the end of the basic block instead of skipping labels from the front. This caused failures in landing pads when live-in copies where inserted before instruction selection. I missed this change in r252720; without it, certain compilation flags can cause exception labels to not be generated, but still referenced, leading to link errors. Reported by: zeising MFC after: 3 days
* Pull in r185594 from llvm trunk:dim2013-07-043-26/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add MachineBasicBlock::addLiveIn(). This function adds a live-in physical register to an MBB and ensures that it is copied to a virtual register immediately. Pull in r185615 from llvm trunk: Live-in copies go *after* EH_LABELs. This will soon be tested by exception handling working at all. Pull in r185617 from llvm trunk: Simplify landing pad lowering. Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering landing pad arguments. These nodes were previously legalized into CopyFromReg nodes, but that never worked properly because the CopyFromReg node weren't guaranteed to be scheduled at the top of the basic block. This meant the exception pointer and selector registers could be clobbered before being copied to a virtual register. This patch copies the two physical registers to virtual registers at the beginning of the basic block, and lowers the landingpad instruction directly to two CopyFromReg nodes reading the *virtual* registers. This is safe because virtual registers don't get clobbered. A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION nodes. Together, these changes fix llvm PR 16038 ('qt4 webcore file results in "Bad machine code: Using an undefined physical register"'), and should make it possible again to compile the www/qt4-webkit port again on the i386 arch, without using a CPUTYPE=i686 or higher setting.
* Pull in r183984 from llvm trunk:dim2013-06-201-1/+3
| | | | | | | | | | | | | Make PrologEpilogInserter save/restore all callee saved registers in functions which call __builtin_unwind_init() __builtin_unwind_init() is an undocumented gcc intrinsic which has this effect, and is used in libgcc_eh. Goes part of the way toward fixing PR8541. This obsoletes the ugly hack to libgcc's unwind code from r245272, and should also work for other arches, so revert the hack too.
* Upgrade our copy of llvm/clang to 3.3 release.dim2013-06-1247-627/+1507
| | | | | | Release notes are still in the works, these will follow soon. MFC after: 1 month
* Pull in r183297 from upstream llvm trunk:dim2013-06-051-3/+31
| | | | | | | | | | | | | | | | | | | PR15662: Optimized debug info produces out of order function parameters When a function is inlined we lazily construct the variables representing the function's parameters. After that, we add any remaining unused parameters. If the function doesn't use all the parameters, or uses them out of order, then the DWARF would produce them in that order, producing a parameter order that doesn't match the source. This fix causes us to always keep the arg variables at the start of the variable list & in the original order from the source. Reported by: avg MFC after: 1 week
* Upgrade our copy of llvm/clang to trunk r178860, in preparation of thedim2013-04-12154-8459/+11450
| | | | | | | | | upcoming 3.3 release (branching and freezing expected in a few weeks). Preliminary release notes can be found at the usual location: <http://llvm.org/docs/ReleaseNotes.html> An MFC is planned once the actual 3.3 release is finished.
* Upgrade our copy of llvm/clang to r168974, from upstream's release_32dim2012-12-03123-3363/+7267
| | | | | branch. This is effectively llvm/clang 3.2 RC2; the 3.2 release is coming soon.
* Pull in r164132 from upstream llvm trunk:dim2012-10-101-3/+3
| | | | | | | | | | | | | | | | | When creating MCAsmBackend pass the CPU string as well. In X86AsmBackend store this and use it to not emit long nops when the CPU is geode which doesnt support them. Fixes PR11212. Pull in r164133 from upstream clang trunk: Follow up on llvm r164132. This should prevent illegal instructions when building world on Geode CPUs (e.g. Soekris). MFC after: 3 days
* Upgrade our copy of llvm/clang to trunk r162107. With thanks todim2012-08-20121-7120/+10832
| | | | Benjamin Kramer and Joerg Sonnenberger for their input and fixes.
* Upgrade our copy of llvm/clang to 3.1 release. Release notes can bedim2012-05-231-28/+58
| | | | | | found at: http://llvm.org/releases/3.1/docs/ReleaseNotes.html MFC after: 3 days
* Upgrade our copy of llvm/clang to r155985, from upstream's release_31dim2012-05-0315-237/+374
| | | | | | | branch. This brings us very close to the 3.1 release, which is planned for May 14th. MFC after: 2 weeks
* Upgrade our copy of llvm/clang to trunk r154661, in preparation of thedim2012-04-16153-17657/+15190
| | | | | | | upcoming 3.1 release (expected in a few weeks). Preliminary release notes can be found at: <http://llvm.org/docs/ReleaseNotes.html> MFC after: 2 weeks
* Upgrade our copy of llvm/clang to 3.0 release. Release notes can bedim2011-12-094-14/+24
| | | | | | found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html MFC after: 1 week
* Upgrade our copy of llvm/clang to r142614, from upstream's release_30dim2011-10-22100-4400/+6982
| | | | | | | branch. This brings us very close to the 3.0 release, which is expected in a week or two. MFC after: 1 week
* Upgrade our copy of llvm/clang to r135360, from upstream's trunk.dim2011-07-1792-4741/+5160
|
* Upgrade our copy of llvm/clang to r132879, from upstream's trunk.dim2011-06-1272-2164/+2982
|
* Upgrade our copy of llvm/clang to r130700, from upstream's trunk.dim2011-05-0293-4811/+7929
|
* Update llvm/clang to trunk r126547.dim2011-02-2724-264/+590
| | | | | | | | | | | | | | There are several bugfixes in this update, but the most important one is to ensure __start_ and __stop_ symbols for linker sets and kernel module metadata are always emitted in object files: http://llvm.org/bugs/show_bug.cgi?id=9292 Before this fix, if you compiled kernel modules with clang, they would not be properly processed by kldxref, and if they had any dependencies, the kernel would fail to load those. Another problem occurred when attempting to mount a tmpfs filesystem, which would result in 'operation not supported by device'.
* Upgrade our copy of llvm/clang to r126079, from upstream's trunk.dim2011-02-20136-11830/+17715
| | | | | This contains many improvements, primarily better C++ support, an integrated assembler for x86 and support for -pg.
* Remove more unneeded files and directories from contrib/llvm. Thisdim2010-10-117-369/+0
| | | | | | | still allows us to build tblgen and clang, and further reduces the footprint in the tree. Approved by: rpaulo (mentor)
* Upgrade Clang and LLVM to the 2.8 release. See here for release notes:dim2010-10-071-1/+8
| | | | | | http://llvm.org/releases/2.8/docs/ReleaseNotes.html Approved by: rpaulo (mentor)
* Upgrade our Clang in base to r114020, from upstream's release_28 branch.dim2010-09-20105-2940/+7814
| | | | Approved-by: rpaulo (mentor)
* Upgrade our Clang in base to r108428.ed2010-07-20100-6490/+5882
| | | | | | | | | This commit merges the latest LLVM sources from the vendor space. It also updates the build glue to match the new sources. Clang's version number is changed to match LLVM's, which means /usr/include/clang/2.0 has been renamed to /usr/include/clang/2.8. Obtained from: projects/clangbsd
* Import LLVM/clang from vendor stripped of docs/ test/ website/ www/ examples/rdivacky2010-06-09145-0/+103624
in llvm/ and/or llvm/contrib/clang/ respectively. Approved by: ed (mentor) Approved by: core
OpenPOWER on IntegriCloud