aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move all sources from the llvm project into contrib/llvm-project.Dimitry Andric2019-12-201-10479/+0
| | | | | | | | | | | | | This uses the new layout of the upstream repository, which was recently migrated to GitHub, and converted into a "monorepo". That is, most of the earlier separate sub-projects with their own branches and tags were consolidated into one top-level directory, and are now branched and tagged together. Updating the vendor area to match this layout is next. Notes: svn path=/head/; revision=355940
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmpDimitry Andric2019-09-071-1/+1
| | | | | | | release_90 branch r371301, and update version numbers. Notes: svn path=/projects/clang900-import/; revision=352010
* Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb, and openmpDimitry Andric2019-09-021-7/+28
| | | | | | | release_90 branch r369369, and update version numbers. Notes: svn path=/projects/clang900-import/; revision=351708
* Merge llvm trunk r366426, resolve conflicts, and update FREEBSD-Xlist.Dimitry Andric2019-08-211-1141/+1166
| | | | Notes: svn path=/projects/clang900-import/; revision=351344
* Merge llvm release_80 branch r351543, and resolve conflicts.Dimitry Andric2019-01-221-0/+2
| | | | Notes: svn path=/projects/clang800-import/; revision=343313
* Merge llvm trunk r351319, resolve conflicts, and update FREEBSD-Xlist.Dimitry Andric2019-01-201-242/+350
| | | | Notes: svn path=/projects/clang800-import/; revision=343210
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branchDimitry Andric2018-08-181-16/+37
| | | | | | | | | r339999, resolve conflicts, and bump version numbers. PR: 230240,230355 Notes: svn path=/projects/clang700-import/; revision=338014
* Merge llvm trunk r338150 (just before the 7.0.0 branch point), andDimitry Andric2018-08-021-107/+139
| | | | | | | resolve conflicts. Notes: svn path=/projects/clang700-import/; revision=337149
* Merge llvm trunk r338150, and resolve conflicts.Dimitry Andric2018-07-301-335/+576
| | | | Notes: svn path=/projects/clang700-import/; revision=336916
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_60 r321788,Dimitry Andric2018-01-061-6/+6
| | | | | | | update build glue and version numbers. Notes: svn path=/projects/clang600-import/; revision=327657
* Merge llvm trunk r321017 to contrib/llvm.Dimitry Andric2017-12-201-236/+428
| | | | Notes: svn path=/projects/clang600-import/; revision=327023
* Upgrade our copies of clang, llvm and libc++ to r310316 from theDimitry Andric2017-08-091-15/+24
| | | | | | | | | | upstream release_50 branch. MFC after: 2 months X-MFC-with: r321369 Notes: svn path=/head/; revision=322320
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r307894, and updateDimitry Andric2017-07-131-13/+121
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320970
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r306956, and updateDimitry Andric2017-07-021-1/+1
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320572
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305575, and updateDimitry Andric2017-06-171-30/+31
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=320041
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r305145, and updateDimitry Andric2017-06-101-76/+173
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319799
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304149, and updateDimitry Andric2017-05-291-23/+67
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=319164
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r303197, and updateDimitry Andric2017-05-161-28/+110
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=318384
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302418, and updateDimitry Andric2017-05-081-35/+53
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=317969
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r302069, and updateDimitry Andric2017-05-031-134/+69
| | | | | | | build glue (preliminary, not all option combinations work yet). Notes: svn path=/projects/clang500-import/; revision=317778
* Merge llvm, clang, lld, lldb, compiler-rt and libc++ r301441, and updateDimitry Andric2017-04-261-23/+22
| | | | | | | build glue. Notes: svn path=/projects/clang500-import/; revision=317472
* Merge llvm, clang, lld and lldb trunk r300890, and update build glue.Dimitry Andric2017-04-201-11/+15
| | | | Notes: svn path=/projects/clang500-import/; revision=317230
* Merge llvm trunk r300422 and resolve conflicts.Dimitry Andric2017-04-161-406/+590
| | | | Notes: svn path=/projects/clang500-import/; revision=317029
* Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branchDimitry Andric2017-02-171-0/+9
| | | | | | | r295380, and update build glue. Notes: svn path=/projects/clang400-import/; revision=313894
* Merge llvm, clang, lld and lldb release_40 branch r292009. Also updateDimitry Andric2017-01-141-33/+0
| | | | | | | build glue. Notes: svn path=/projects/clang400-import/; revision=312197
* Merge llvm, clang, lld and lldb trunk r291274, and resolve conflicts.Dimitry Andric2017-01-061-6/+11
| | | | Notes: svn path=/projects/clang400-import/; revision=311544
* Update llvm to trunk r290819 and resolve conflicts.Dimitry Andric2017-01-021-372/+629
| | | | Notes: svn path=/projects/clang400-import/; revision=311142
* Pull in r280350 from upstream llvm trunk (by Hal Finkel):Dimitry Andric2016-09-101-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ISD::EH_DWARF_CFA, simplify @llvm.eh.dwarf.cfa on Mips, fix on PowerPC LLVM has an @llvm.eh.dwarf.cfa intrinsic, used to lower the GCC-compatible __builtin_dwarf_cfa() builtin. As pointed out in PR26761, this is currently broken on PowerPC (and likely on ARM as well). Currently, @llvm.eh.dwarf.cfa is lowered using: ADD(FRAMEADDR, FRAME_TO_ARGS_OFFSET) where FRAME_TO_ARGS_OFFSET defaults to the constant zero. On x86, FRAME_TO_ARGS_OFFSET is lowered to 2*SlotSize. This setup, however, does not work for PowerPC. Because of the way that the stack layout works, the canonical frame address is not exactly (FRAMEADDR + FRAME_TO_ARGS_OFFSET) on PowerPC (there is a lower save-area offset as well), so it is not just a matter of implementing FRAME_TO_ARGS_OFFSET for PowerPC (unless we redefine its semantics -- We can do that, since it is currently used only for @llvm.eh.dwarf.cfa lowering, but the better to directly lower the CFA construct itself (since it can be easily represented as a fixed-offset FrameIndex)). Mips currently does this, but by using a custom lowering for ADD that specifically recognizes the (FRAMEADDR, FRAME_TO_ARGS_OFFSET) pattern. This change introduces a ISD::EH_DWARF_CFA node, which by default expands using the existing logic, but can be directly lowered by the target. Mips is updated to use this method (which simplifies its implementation, and I suspect makes it more robust), and updates PowerPC to do the same. Fixes PR26761. Differential Revision: https://reviews.llvm.org/D24038 Notes: svn path=/projects/clang390-import/; revision=305683
* Update llvm to release_39 branch r276489, and resolve conflicts.Dimitry Andric2016-08-161-327/+836
| | | | Notes: svn path=/projects/clang390-import/; revision=304240
* Update llvm, clang and lldb to trunk r257626, and update build glue.Dimitry Andric2016-01-141-2/+7
| | | | Notes: svn path=/projects/clang380-import/; revision=294024
* Update llvm to trunk r256945.Dimitry Andric2016-01-061-9/+48
| | | | Notes: svn path=/projects/clang380-import/; revision=293265
* Update llvm to trunk r256633.Dimitry Andric2015-12-301-383/+665
| | | | Notes: svn path=/projects/clang380-import/; revision=292941
* Update llvm/clang to r242221.Dimitry Andric2015-08-121-251/+304
| | | | Notes: svn path=/projects/clang-trunk/; revision=286684
* Update llvm/clang to r241361.Dimitry Andric2015-07-051-22/+18
| | | | Notes: svn path=/projects/clang-trunk/; revision=285181
* Update llvm/clang to r240225.Dimitry Andric2015-06-231-34/+122
| | | | Notes: svn path=/projects/clang-trunk/; revision=284734
* Update Makefiles and other build glue for llvm/clang 3.7.0, as of trunkDimitry Andric2015-06-101-24/+43
| | | | | | | r239412. Notes: svn path=/projects/clang-trunk/; revision=284236
* Merge llvm trunk r238337 from ^/vendor/llvm/dist, resolve conflicts, andDimitry Andric2015-05-271-1418/+1598
| | | | | | | preserve our customizations, where necessary. Notes: svn path=/projects/clang-trunk/; revision=283631
* Upgrade our copy of clang and llvm to 3.6.1 release.Dimitry Andric2015-05-251-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=283526
* Pull in r230348 from upstream llvm trunk (by Tim Northover):Dimitry Andric2015-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> Notes: svn path=/head/; revision=280400
* Merge llvm 3.6.0rc4 from ^/vendor/llvm/dist, merge clang 3.6.0rc4 fromDimitry Andric2015-02-191-2/+4
| | | | | | | ^/vendor/clang/dist, resolve conflicts, and update patches. Notes: svn path=/projects/clang360-import/; revision=279025
* Merge llvm 3.6.0rc3 from ^/vendor/llvm/dist, merge clang 3.6.0rc3 fromDimitry Andric2015-02-141-29/+4
| | | | | | | ^/vendor/clang/dist, resolve conflicts, and update patches README. Notes: svn path=/projects/clang360-import/; revision=278757
* Merge llvm 3.6.0rc1 from ^/vendor/llvm/dist, merge clang 3.6.0rc1 fromDimitry Andric2015-01-251-509/+777
| | | | | | | ^/vendor/clang/dist, resolve conflicts, and cleanup patches. Notes: svn path=/projects/clang360-import/; revision=277718
* Merge llvm 3.5.0 release from ^/vendor/llvm/dist, resolve conflicts, andDimitry Andric2014-11-241-511/+690
| | | | | | | preserve our customizations, where necessary. Notes: svn path=/projects/clang350-import/; revision=274968
* Pull in r196939 from upstream llvm trunk (by Reid Kleckner):Dimitry Andric2014-03-181-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=263312
* Upgrade our copy of llvm/clang to 3.4 release. This version supportsDimitry Andric2014-02-161-587/+1214
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=261991
* Pull in r185594 from llvm trunk:Dimitry Andric2013-07-041-22/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=252720
* Upgrade our copy of llvm/clang to 3.3 release.Dimitry Andric2013-06-121-34/+68
| | | | | | | | | Release notes are still in the works, these will follow soon. MFC after: 1 month Notes: svn path=/head/; revision=251662
* Upgrade our copy of llvm/clang to trunk r178860, in preparation of theDimitry Andric2013-04-121-398/+299
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=249423
* Upgrade our copy of llvm/clang to r168974, from upstream's release_32Dimitry Andric2012-12-031-129/+243
| | | | | | | | branch. This is effectively llvm/clang 3.2 RC2; the 3.2 release is coming soon. Notes: svn path=/head/; revision=243830
* Upgrade our copy of llvm/clang to trunk r162107. With thanks toDimitry Andric2012-08-201-275/+267
| | | | | | | Benjamin Kramer and Joerg Sonnenberger for their input and fixes. Notes: svn path=/head/; revision=239462