summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* [AArch64] Use the reciprocal estimation machineryEvandro Menezes2016-05-047-3/+339
| | | | | | | This patch adds support for estimating the square root, its reciprocal and division or reciprocal using the combiner generic reciprocal machinery. llvm-svn: 268539
* cmake: Prefix Polly options with LLVM_ to avoid variable shadowingTobias Grosser2016-05-041-12/+20
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Before this change certain Polly variables have been used both as user-facing CACHED cmake variables as well as uncached internal variables. Even though this seems to have worked OK in practice, the behavior only worked due to one variable shadowing the other. This behavior has been found confusing. To make the use of cmake variables more clear we now prefix the cached, user facing variables with LLVM_ as it is common habit for LLVM options and also moved the _POLLY_ term to the beginning to ensure related options are sorted after each other. The variables that control the behavior of LLVM/Polly are then set by forwarding the values set in the user facing option variables. As a result, Polly is now enabled with LLVM_POLLY_BUILD instead of BUILD_POLLY and the linking behavior of Polly is controlled with LLVM_POLLY_LINK_INTO_TOOLS instead of LINK_POLLY_INTO_TOOLS. Reviewers: bogner, Meinersbur Subscribers: pollydev, llvm-commits Differential Revision: http://reviews.llvm.org/D19907 llvm-svn: 268537
* Revert r268529 because it caused use-of-uninitialized-valueVitaly Buka2016-05-042-211/+6
| | | | | | | | | | | | | | | | | | | | | | Summary: This reverts commit d88cc0862bf7da64850b89e9bb5ea9f95e7f1184. #0 0xfed467 in llvm::ARMFrameLowering::determineCalleeSaves(llvm::MachineFunction&, llvm::BitVector&, llvm::RegScavenger*) const /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/Target/ARM/ARMFrameLowering.cpp:1625:52 #1 0x330d4cc in (anonymous namespace)::PEI::runOnMachineFunction(llvm::MachineFunction&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/CodeGen/PrologEpilogInserter.cpp:186:3 #2 0x3193e12 in llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/CodeGen/MachineFunctionPass.cpp:60:13 #3 0x396237d in llvm::FPPassManager::runOnFunction(llvm::Function&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1526:23 #4 0x3962a23 in llvm::FPPassManager::runOnModule(llvm::Module&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1547:16 #5 0x3963d52 in runOnModule /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1603:23 #6 0x3963d52 in llvm::legacy::PassManagerImpl::run(llvm::Module&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/lib/IR/LegacyPassManager.cpp:1706 #7 0x6bb910 in compileModule(char**, llvm::LLVMContext&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:412:5 #8 0x6b3c25 in main /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/llc/llc.cpp:218:22 #9 0x7fd4a7d37ec4 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21ec4) #10 0x625c93 in _start (/mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm_build_msan/bin/llc+0x625c93) Reviewers: Subscribers: llvm-svn: 268536
* [codeview] Add a type visitor to help abstract away type stream handlingReid Kleckner2016-05-047-498/+697
| | | | | | | | | | | | | | | | | | Summary: Port the dumper in llvm-readobj over to it. I'm planning to use this visitor to power type stream merging. While we're at it, try to switch from StringRef to ArrayRef<uint8_t> in some places. Reviewers: zturner, amccarth Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19899 llvm-svn: 268535
* [ConstantFold] Don't try to strip fp -> int bitcasts to simplify icmpsHal Finkel2016-05-042-0/+56
| | | | | | | | | | | | | ConstantFold has logic to take icmp (bitcast x to y), null and strip the bitcast. This makes sense in general, but not if x has floating-point type. In this case, we'd need a fcmp, not an icmp, and the code will assert. We normally don't see this situation because we constant fold fp -> int bitcasts, however, we'll see it for bitcasts of ppc_fp128 -> i128. This is because that bitcast is Endian-dependent, and as a result, we don't simplify it in ConstantFold (we could, but no one has yet added the necessary logic). Regardless, ConstantFold should not depend on that canonicalization for correctness. llvm-svn: 268534
* [x86] add tests to show current codegen for obscured fneg/fabsSanjay Patel2016-05-041-0/+50
| | | | llvm-svn: 268533
* [MSan] [Mips64] Add tests for vararg handling.Marcin Koscielnicki2016-05-042-0/+85
| | | | | | Differential Revision: http://reviews.llvm.org/D19919 llvm-svn: 268531
* Revert "[InstCombine] Canonicalize icmp instructions based on dominating ↵Balaram Makam2016-05-044-185/+0
| | | | | | | | conditions." This reverts commit 573a40f79b35cf3e71db331bb00f6a84f03b835d. llvm-svn: 268530
* [ARM] Fix Scavenger assert due to underestimated stack sizeWeiming Zhao2016-05-042-6/+211
| | | | | | | | | | | | | Summary: Currently, when checking if a stack is "BigStack" or not, it doesn't count into spills and arguments. Therefore, LLVM won't reserve spill slot for this actually "BigStack". This may cause scavenger failure. Reviewers: rengolin Subscribers: aemerson, rengolin, tberghammer, danalbert, srhines, llvm-commits Differential Revision: http://reviews.llvm.org/D19896 llvm-svn: 268529
* Fix spelling in comment. NFC.Simon Pilgrim2016-05-041-1/+1
| | | | llvm-svn: 268528
* Revert r268504Simon Pilgrim2016-05-042-1519/+11965
| | | | llvm-svn: 268526
* Adding test cases showing the behavior of LoopUnrollPass according to ↵Marianne Mailhot-Sarrasin2016-05-041-0/+160
| | | | | | | | | | optnone and optsize attributes The unroll pass was disabled by clang in /Os. Those new test cases shows that the pass will behave correctly even if it is not fully disabled. This patch is related in some way to the clang commit (http://reviews.llvm.org/D19827), which re-enables the pass in /Os. Differential Revision: http://reviews.llvm.org/D19870 llvm-svn: 268524
* [NVPTX:doc] Update code examples to conform to the latest IR.Jingyue Wu2016-05-041-23/+23
| | | | llvm-svn: 268522
* [InstCombine] Canonicalize icmp instructions based on dominating conditions.Balaram Makam2016-05-044-0/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch canonicalizes conditions based on the constant range information of the dominating branch condition. For example: %cmp = icmp slt i64 %a, 0 br i1 %cmp, label %land.lhs.true, label %lor.rhs lor.rhs: %cmp2 = icmp sgt i64 %a, 0 Would now be canonicalized into: %cmp = icmp slt i64 %a, 0 br i1 %cmp, label %land.lhs.true, label %lor.rhs lor.rhs: %cmp2 = icmp ne i64 %a, 0 Reviewers: mcrosier, gberry, t.p.northover, llvm-commits, reames, hfinkel, sanjoy, majnemer Subscribers: MatzeB, majnemer, mcrosier Differential Revision: http://reviews.llvm.org/D18841 llvm-svn: 268521
* [Support] Creation of minidump after compiler crash on WindowsLeny Kholodov2016-05-046-1/+247
| | | | | | | | | | | In the current implementation compiler only prints stack trace to console after crash. This patch adds saving of minidump files which contain a useful subset of the information for further debugging. Differential Revision: http://reviews.llvm.org/D18216 llvm-svn: 268519
* Reland "Use ScopedPrinter in llvm-pdbdump"Reid Kleckner2016-05-043-1139/+1431
| | | | | | | This reverts r268508 and reinstates r268506 with an additional cast from TypeLeafKind to unsigned to allow conversion to HexNumber. llvm-svn: 268517
* [PowerPC] Generate VSX version of splat wordNemanja Ivanovic2016-05-048-9/+186
| | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D18592 It allows the PPC back end to generate the xxspltw instruction where we previously only emitted vspltw. llvm-svn: 268516
* [X86][SSE] Regenerate vector bswap testsSimon Pilgrim2016-05-041-60/+91
| | | | llvm-svn: 268514
* Typo. NFC.Chad Rosier2016-05-041-3/+3
| | | | llvm-svn: 268513
* [SimplifyCFG] isSafeToSpeculateStore now ignores debug infoHans Wennborg2016-05-042-2/+74
| | | | | | | | | | | | | | | This patch fixes PR27615. @llvm.dbg.value instructions no longer count towards the maximum number of instructions to look back at in the instruction list when searching for a store instruction. This should make the output consistent between debug and non-debug build. Patch by Henric Karlsson <henric.karlsson@ericsson.com>! Differential Revision: http://reviews.llvm.org/D19912 llvm-svn: 268512
* Revert "Use ScopedPrinter in llvm-pdbdump"Chad Rosier2016-05-043-1431/+1139
| | | | | | This reverts commit r268506 due to build breakage. llvm-svn: 268508
* Use a uniform name for the load combine pass. NFC.Chad Rosier2016-05-041-6/+5
| | | | llvm-svn: 268507
* Use ScopedPrinter in llvm-pdbdumpZachary Turner2016-05-043-1139/+1431
| | | | | | | | | | | | | | | | When printing raw PDB file fields, streams, and records, use the ScopedPrinter class so we have consistency with llvm-readobj's output format. For the most part this is pretty mechanical, but I had to fix up the test file to conform to the new YAMLesque output format. i added a few additional helper functions to the ScopedPrinter such as one to print a dotted version, etc. Differential Revision: http://reviews.llvm.org/D19897 Reviewed By: rnk llvm-svn: 268506
* [SelectionDAG] BITREVERSE vector legalization of bit operationsSimon Pilgrim2016-05-042-11965/+1519
| | | | | | | | Vector bit operations are typically promoted instead of having custom lowering. This patch changes the isOperationLegalOrCustom tests for vector AND/OR operations to use isOperationLegalOrPromote instead, allowing the SSE implementations to stay on the simd unit. Differential Revision: http://reviews.llvm.org/D19805 llvm-svn: 268504
* AMDGPU/R600: Minor cleanup in InstrInfoJan Vesely2016-05-041-17/+16
| | | | | | | | | | | | | | Use std::make_pair instead of constructor Use C++11 loop Reuse helper var Reviewers: tstellardAMD Subsribers: arsenm Differential Revision: http://reviews.llvm.org/D19787 llvm-svn: 268503
* [RS4GC] Use SetVector/MapVector instead of DenseSet/DenseMap to guarantee ↵Igor Laevsky2016-05-046-106/+66
| | | | | | | | | | | | | | | stable ordering Goal of this change is to guarantee stable ordering of the statepoint arguments and other newly inserted values such as gc.relocates. Previously we had explicit sorting in a couple of places. However for unnamed values ordering was partial and overall we didn't have any strong invariant regarding it. This change switches all data structures to use SetVector's and MapVector's which provide possibility for deterministic iteration over them. Explicit sorting is now redundant and was removed. Differential Revision: http://reviews.llvm.org/D19669 llvm-svn: 268502
* The test files are auto-generated by update_llc_test_checks.py utility.Elena Demikhovsky2016-05-042-186/+1198
| | | | | | No functional changes. llvm-svn: 268498
* [mips][ias] Only round section sizes when explicitly requested.Daniel Sanders2016-05-043-15/+27
| | | | | | | | As requested by Rafael Espindola in his post-commit comments on r268036. This makes the previous behaviour the default while still allowing verification of IAS. llvm-svn: 268496
* [Sparc] Allow taking of function address into a register.Chris Dewhurst2016-05-042-5/+56
| | | | | | | | Modification of previously existing code (variable rename only), with unit test added. Differential Revision: http://reviews.llvm.org/D19368 llvm-svn: 268493
* [mips][microMIPS] Add CodeGen support for microMIPSr6 ROTR and ROTRV and add ↵Zlatko Buljan2016-05-0417-11/+155
| | | | | | | | tests for LL, SC, SYSCALL, ROTR, ROTRV, LWM32, SWM32 and MOVEP instructions Differential Revision: http://reviews.llvm.org/D19857 llvm-svn: 268491
* [Sparc] Implement __builtin_setjmp, __builtin_longjmp back-end.Chris Dewhurst2016-05-044-21/+380
| | | | | | | | | | | | | | This code implements builtin_setjmp and builtin_longjmp exception handling intrinsics for 32-bit Sparc back-ends. The code started as a mash-up of the PowerPC and X86 versions, although there are sufficient differences to both that had to be made for Sparc handling. Note: I have manual tests running. I'll work on a unit test and add that to the rest of this diff in the next day. Also, this implementation is only for 32-bit Sparc. I haven't focussed on a 64-bit version, although I have left the code in a prepared state for implementing this, including detecting pointer size and comments indicating where I suspect there may be differences. Differential Revision: http://reviews.llvm.org/D19798 llvm-svn: 268483
* [mips] Remove -mattr=+n64 and fix indentation in tailcall.ll RUN lines. NFC.Daniel Sanders2016-05-041-5/+5
| | | | | | | -mattr=+n64 isn't the correct way to specify the ABI and N64 is already the default for the RUN line concerned. llvm-svn: 268482
* [ConstantFolding, ValueTracking] Fold constants involving bitcasts of ↵David Majnemer2016-05-043-9/+39
| | | | | | | | | | | | | | | | | ConstantVector We assumed that ConstantVectors would be rather uninteresting from the perspective of analysis. However, this is not the case due to a quirk of how LLVM handles vectors of i1. Vectors of i1 are not ConstantDataVectors like vectors of i8, i16, i32 or i64 because i1's SizeInBits differs from it's StoreSizeInBytes. This leads to it being categorized as a ConstantVector instead of a ConstantDataVector. Instead, treat ConstantVector more uniformly. This fixes PR27591. llvm-svn: 268479
* [llvm-readobj] Print MIPS .MIPS.options section contentSimon Atanasyan2016-05-045-7/+80
| | | | | | | | | .MIPS.options section specifies miscellaneous options to be applied to an object file. LLVM as well as modern versions of GNU tools emit the only type of the options - ODK_REGINFO. The patch teaches llvm-readobj to print details of the ODK_REGINFO and skip contents of other options. llvm-svn: 268478
* [IPO/ConstantMerge] Convert to static function, to facilitate transition to ↵Davide Italiano2016-05-041-6/+1
| | | | | | the new PM. llvm-svn: 268476
* Make ListScope and DictScope re-use the same code.Zachary Turner2016-05-041-18/+11
| | | | llvm-svn: 268472
* [X86] Lower zext i1 argumentsDavid Majnemer2016-05-042-0/+57
| | | | | | | | | | | | | i1 is now a legal type for X86 with AVX512. There were some paths in X86FastISel which were not quite ready to see an i1 value: they were not quite sure how to deal with sign/zero extends for call arguments. DTRT by extending to i8 for zeroext and bailing out of FastISel for signext. This fixes PR27591. llvm-svn: 268470
* Remove (unused) "using namespace llvm;" in Support header. This caused the ↵Richard Smith2016-05-041-2/+0
| | | | | | modules build to break. llvm-svn: 268469
* [GlobalDCE, Misc] Don't remove functions referenced by ifuncsDavid Majnemer2016-05-047-22/+72
| | | | | | | | | | | | We forgot to consider the target of ifuncs when considering if a function was alive or dead. N.B. Also update a few auxiliary tools like bugpoint and verify-uselistorder. This fixes PR27593. llvm-svn: 268468
* [Support] Add a free toString function for ErrorVedant Kumar2016-05-032-0/+38
| | | | | | | | | | toString() consumes an Error and returns a string representation of its contents. This commit also adds a message() method to ErrorInfoBase for convenience. Differential Revision: http://reviews.llvm.org/D19883 llvm-svn: 268465
* llvm-pdbdump: Update libdeps.NAKAMURA Takumi2016-05-031-1/+2
| | | | llvm-svn: 268464
* Produce another specific error message for a malformed Mach-O file when a loadKevin Enderby2016-05-035-8/+11
| | | | | | | | | | | | | | | | command has a size less than 8 bytes. I think the existing test case in test/Object/macho-invalid.test for macho64-invalid-too-small-load-command was trying to test for this but that test case triggered a different error given how it was constructed. So I constructed a new test case that would trigger this specific error. I also changed the error message to be consistent with the other malformed Mach-O file error messages. I also removed object_error::macho_small_load_command from Object/Error.h as it is not needed and can just use object_error::parse_failed and let the error message string distinguish the error. llvm-svn: 268463
* Fix template type deduction error on some compilers.Zachary Turner2016-05-031-1/+1
| | | | llvm-svn: 268458
* Add opt-bisect support to additional passes that can be skippedAndrew Kaylor2016-05-0316-6/+46
| | | | | | Differential Revision: http://reviews.llvm.org/D19882 llvm-svn: 268457
* Remove unused variable.Zachary Turner2016-05-031-2/+0
| | | | llvm-svn: 268455
* Move CodeViewTypeStream to DebugInfo/CodeViewZachary Turner2016-05-035-184/+161
| | | | | | | | | | | | | Ability to parse codeview type streams is also needed by DebugInfoPDB for parsing PDBs, so moving this into a library gives us this option. Since DebugInfoPDB had already hand rolled some code to do this, that code is now convereted over to using this common abstraction. Differential Revision: http://reviews.llvm.org/D19887 Reviewed By: dblaikie, amccarth llvm-svn: 268454
* PM: Port LoopRotation to the new loop pass managerJustin Bogner2016-05-037-10/+71
| | | | llvm-svn: 268452
* [X86][XOP] Add placeholder VPERMIL2 combining testsSimon Pilgrim2016-05-031-0/+62
| | | | llvm-svn: 268450
* PM: Port LoopSimplifyCFG to the new pass managerJustin Bogner2016-05-037-44/+92
| | | | llvm-svn: 268446
* [X86] Tidied up SDValue's SDNode referencing. NFCI.Simon Pilgrim2016-05-031-5/+5
| | | | llvm-svn: 268445
OpenPOWER on IntegriCloud