summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix for (benign) uninitialized read caught by UBSan bot.Sean Silva2016-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What happened here is that in the new PM there is a bunch of new copying (actually, moving) and so this reads the HasProfileData member in situations where it used to not be read. It used to only be read strictly in the "runOnFunction" method and its callees, where is *is* initialized (even after my patch). So this ends up being benign as far as functional behavior of the compiler (since we set HasProfileData in the "runImpl" method before we ever make decisions based on it). It's awesome that UBSan caught this. It highlights one more thing to watch out for when porting passes. Sanitizer bot log was: -- Testing: 17049 tests, 32 threads -- Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. FAIL: LLVM :: Transforms/JumpThreading/thread-loads.ll (15184 of 17049) ******************** TEST 'LLVM :: Transforms/JumpThreading/thread-loads.ll' FAILED ******************** Script: -- /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/opt < /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/Transforms/JumpThreading/thread-loads.ll -jump-threading -S | /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/FileCheck /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/Transforms/JumpThreading/thread-loads.ll /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/opt < /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/Transforms/JumpThreading/thread-loads.ll -passes=jump-threading -S | /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/FileCheck /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/Transforms/JumpThreading/thread-loads.ll -- Exit Code: 2 Command Output (stderr): -- /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Transforms/Scalar/JumpThreading.h:90:57: runtime error: load of value 136, which is not a valid value for type 'bool' #0 0x2c33ba1 in llvm::JumpThreadingPass::JumpThreadingPass(llvm::JumpThreadingPass&&) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/Transforms/Scalar/JumpThreading.h:90:57 #1 0x2bc88e4 in void llvm::PassManager<llvm::Function>::addPass<llvm::JumpThreadingPass>(llvm::JumpThreadingPass) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/include/llvm/IR/PassManager.h:282:40 #2 0x2bb2682 in llvm::PassBuilder::parseFunctionPassName(llvm::PassManager<llvm::Function>&, llvm::StringRef) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Passes/PassRegistry.def:133:1 #3 0x2bb4914 in llvm::PassBuilder::parseFunctionPassPipeline(llvm::PassManager<llvm::Function>&, llvm::StringRef&, bool, bool) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Passes/PassBuilder.cpp:489:12 #4 0x2bb6f81 in llvm::PassBuilder::parsePassPipeline(llvm::PassManager<llvm::Module>&, llvm::StringRef, bool, bool) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/lib/Passes/PassBuilder.cpp:674:10 #5 0x986690 in llvm::runPassPipeline(llvm::StringRef, llvm::LLVMContext&, llvm::Module&, llvm::TargetMachine*, llvm::tool_output_file*, llvm::StringRef, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool) /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/opt/NewPMDriver.cpp:85:8 #6 0x9af25e in main /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/tools/opt/opt.cpp:468:12 #7 0x7fd7e27dbf44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f44) #8 0x960157 in _start (/mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/bin/opt+0x960157) FileCheck error: '-' is empty. FileCheck command line: /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm_build_ubsan/./bin/FileCheck /mnt/b/sanitizer-buildbot3/sanitizer-x86_64-linux-fast/build/llvm/test/Transforms/JumpThreading/thread-loads.ll -- ******************** Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. Testing Time: 128.90s ******************** Failing Tests (1): LLVM :: Transforms/JumpThreading/thread-loads.ll Expected Passes : 16725 Expected Failures : 129 Unsupported Tests : 194 Unexpected Failures: 1 llvm-svn: 272616
* [PM] Port MemCpyOpt to the new PM.Sean Silva2016-06-148-59/+170
| | | | | | | | | The need for all these Lookup* functions is just because of calls to getAnalysis inside methods (i.e. not at the top level) of the runOnFunction method. They should be straightforward to clean up when the old PM is gone. llvm-svn: 272615
* Add missing include from r272607 to fix modules build, and remove out-dated ↵Richard Smith2016-06-142-9/+1
| | | | | | workaround from module map. llvm-svn: 272612
* [PM/MergedLoadStoreMotion] Preserve analyses more aggressively.Davide Italiano2016-06-141-1/+6
| | | | llvm-svn: 272611
* Placate bots fixing a typo in AA-pipeline description. Sorry.Davide Italiano2016-06-141-1/+1
| | | | llvm-svn: 272608
* Bring back "[PM] Port JumpThreading to the new PM" with a fixSean Silva2016-06-145-113/+225
| | | | | | | | | | | This reverts commit r272603 and adds a fix. Big thanks to Davide for pointing me at r216244 which gives some insight into how to fix this VS2013 issue. VS2013 can't synthesize a move constructor. So the fix here is to add one explicitly to the JumpThreadingPass class. llvm-svn: 272607
* [PM] Port MergedLoadStoreMotion to the new pass manager.Davide Italiano2016-06-148-52/+107
| | | | llvm-svn: 272606
* Revert "[PM] Port JumpThreading to the new PM"Sean Silva2016-06-145-218/+113
| | | | | | | | This reverts commit r272597. Will investigate issue with VS2013 compilation and then recommit. llvm-svn: 272603
* Revert "Try to appease MSVC on clang-x86-win2008-selfhost"Sean Silva2016-06-141-1/+0
| | | | | | This reverts commit r272601. The attempt didn't work. llvm-svn: 272602
* Try to appease MSVC on clang-x86-win2008-selfhostSean Silva2016-06-141-0/+1
| | | | | | | | | I've tested this locally with VS2015 and there are no issues there, so this might be a VS2013 specific issue. Thanks to Davide for the suggested fix. llvm-svn: 272601
* [LibFuzzer] Move tests in ``fuzzer-traces.test`` that require hooks to their ↵Dan Liew2016-06-142-17/+23
| | | | | | | | | | | | | own test. The tests in ``fuzzer-traces-hooks.test`` only work on Linux because calls to hooks (e.g. ``__sanitizer_weak_hook_memcmp()``) from inside the sanitizer runtime are only implemented on Linux. Therefore these tests are set to only run on Linux. Differential Revision: http://reviews.llvm.org/D21253 llvm-svn: 272600
* Add support for collating profiles for use with code coverageVedant Kumar2016-06-133-1/+79
| | | | | | Differential Revision: http://reviews.llvm.org/D20993 llvm-svn: 272599
* [PM/MergedLoadStoreMotion] Remove unneeded pass dependency.Davide Italiano2016-06-131-1/+0
| | | | llvm-svn: 272598
* [PM] Port JumpThreading to the new PMSean Silva2016-06-135-113/+218
| | | | | | | | | | | | This follows the approach in r263208 (for GVN) pretty closely: - move the bulk of the body of the function to the new PM class. - expose a runImpl method on the new-PM class that takes the IRUnitT and pointers/references to any analyses and use that to implement the old-PM class. - use a private namespace in the header for stuff that used to be file scope llvm-svn: 272597
* [PM/MergeLoadStoreMotion] Convert the logic to static functions.Davide Italiano2016-06-131-85/+63
| | | | | | | Pass AliasAnalyis and MemoryDepResult around. This is in preparation for porting this pass to the new PM. llvm-svn: 272595
* [MBP] Interface cleanups /NFCXinliang David Li2016-06-131-59/+61
| | | | | | | | | | | | Save machine function pointer so that the reference does not need to be passed around. This also gives other methods access to machine function for information such as entry count etc. llvm-svn: 272594
* [PM] Port LVI to the new PM.Sean Silva2016-06-138-31/+92
| | | | | | | | | | | | | | | | | | | This is a bit gnarly since LVI is maintaining its own cache. I think this port could be somewhat cleaner, but I'd rather not spend too much time on it while we still have the old pass hanging around and limiting how much we can clean things up. Once the old pass is gone it will be easier (less time spent) to clean it up anyway. This is the last dependency needed for porting JumpThreading which I'll do in a follow-up commit (there's no printer pass for LVI or anything to test it, so porting a pass that depends on it seems best). I've been mostly following: r269370 / D18834 which ported Dependence Analysis r268601 / D19839 which ported BPI llvm-svn: 272593
* Update the AArch64ExternalSymbolizer to print literal strings as escaped stringsKevin Enderby2016-06-132-5/+6
| | | | | | | | so it is the same as the MCExternalSymbolizer. rdar://17349181 llvm-svn: 272588
* [MBP] Code cleanup #3 /NFCXinliang David Li2016-06-131-43/+137
| | | | | | | | | | | | | | | This is third patch to clean up the code. Included in this patch: 1. Further unclutter trace/chain formation main routine; 2. Isolate the logic to compute global cost/conflict detection into its own method; 3. Heavily document the selection algorithm; 4. Added helper hook to allow PGO specific logic to be added in the future. llvm-svn: 272582
* Move previously added test case to the right locationSanjoy Das2016-06-132-17/+12
| | | | | | | In rL272580 I accidentally added a test case to test/CodeGen when test/Transforms/DeadStoreElimination/ is a better place for it. llvm-svn: 272581
* Fix AAResults::callCapturesBefore for operand bundlesSanjoy Das2016-06-132-1/+18
| | | | | | | | | | | | | | | | Summary: AAResults::callCapturesBefore would previously ignore operand bundles. It was possible for a later instruction to miss its memory dependency on a call site that would only access the pointer through a bundle. Patch by Oscar Blumberg! Reviewers: sanjoy Differential Revision: http://reviews.llvm.org/D21286 llvm-svn: 272580
* Attempt to make windows buildbots happy.George Burgess IV2016-06-131-4/+0
| | | | | | | Broken by r272578. I didn't realize that the default move ctor complaints would happen for non-template classes. :) llvm-svn: 272579
* [CFLAA] Refactor to remove redundant maps. NFC.George Burgess IV2016-06-131-209/+104
| | | | | | | | Patch by Jia Chen. Differential Revision: http://reviews.llvm.org/D21233 llvm-svn: 272578
* [X86][SSE] Added extract to scalar nontemporal store testsSimon Pilgrim2016-06-131-0/+131
| | | | llvm-svn: 272577
* [X86] Remove llvm.x86.bit.scan.{forward,reverse}.32David Majnemer2016-06-133-35/+0
| | | | | | | The need for these intrinsics has been obviated by r272564 which reimplements their functionality using generic IR. llvm-svn: 272566
* Add triple to input file.Rafael Espindola2016-06-131-0/+1
| | | | | | Patch by H.J. Lu. llvm-svn: 272563
* AMDGPU/SI: Set INDEX_STRIDE for scratch coalescingMarek Olsak2016-06-136-13/+16
| | | | | | | | | | | | | | | | | Summary: Mesa and other users must set this to enable coalescing: - STRIDE = 0 - SWIZZLE_ENABLE = 1 This makes one particular compute shader 8x faster. Reviewers: tstellarAMD, arsenm Subscribers: arsenm, kzhuravl Differential Revision: http://reviews.llvm.org/D21136 llvm-svn: 272556
* In openFileForRead, attempt to fetch the actual name of the file on disk -- ↵Taewook Oh2016-06-134-3/+196
| | | | | | | | | | | | | including case -- so that clang can later warn about non-portable #include and #import directives. Differential Revision: http://reviews.llvm.org/D19842 Corresponding clang patch: http://reviews.llvm.org/D19843 Re-commit after addressing issues with of generating too many warnings for Windows and asan test failures Patch by Eric Niebler llvm-svn: 272555
* AMDGPU: Fix post-RA verifier errors with trackLivenessAfterRegAllocMatt Arsenault2016-06-131-14/+16
| | | | | | | The condition reg of the cndmask_b64 expansion can't be killed by the first one, and the implicit super register implicit def is needed. llvm-svn: 272554
* [SystemZ] Enable index register memory constraints for inline ASMUlrich Weigand2016-06-136-39/+128
| | | | | | | | | | | | | | | | This enables use of the 'R' and 'T' memory constraints for inline ASM operands on SystemZ, which allow an index register as well as an immediate displacement. This patch includes corresponding documentation and test case updates. As with the last patch of this kind, I moved the 'm' constraint to the most general case, which is now 'T' (base + 20-bit signed displacement + index register). Author: colpell Differential Revision: http://reviews.llvm.org/D21239 llvm-svn: 272547
* [ARM] Reverting r272544 because clang patch needsRanjeet Singh2016-06-135-81/+19
| | | | | | | to go in as soon as llvm patch has gone in because tests will start breaking in Clang. llvm-svn: 272546
* Fix a typo in loop versioning.Vikram TV2016-06-131-1/+1
| | | | | | | | | | Reviewers: ashutosh.nema Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21281 llvm-svn: 272545
* [ARM] Add mrrc/mrrc2 co-processor intrinsicsRanjeet Singh2016-06-135-19/+81
| | | | | | | | | | | | | MRRC/MRRC2 instruction writes to two registers. The intrinsic definition returns a single uint64_t to represent the write, this is a compact way of representing a write to two 32 bit registers, the alternative might have been two return a struct of 2 uint32_t's but this isn't as nice. Differential Revision: llvm-svn: 272544
* This patch fixes handling long double type when it isStrahinja Petrovic2016-06-132-3/+44
| | | | | | constant in soft float mode on PowerPC 32 architecture. llvm-svn: 272543
* [X86][SSE4A] Renamed tests to correspond with the the instruction with being ↵Simon Pilgrim2016-06-131-18/+18
| | | | | | tested llvm-svn: 272542
* Fix an enumeral mismatch warning.Haojian Wu2016-06-131-2/+4
| | | | | | | | | | | | | | | | | Summary: The "-Werror=enum-compare" shows that the statement is using two different enums: enumeral mismatch in conditional expression: 'llvm::X86ISD::NodeType' vs 'llvm::ISD::NodeType' A follow-up fix on D21235. Reviewers: klimek Subscribers: spatel, cfe-commits Differential Revision: http://reviews.llvm.org/D21278 llvm-svn: 272539
* [AArch64] Add RAS extensions support in AArch64TargetParser.Zijiao Ma2016-06-133-2/+7
| | | | | | | RAS extensions are part of ARMv8.2,now supported in Clang. Add RAS extensions support in AArch64TargetParser. llvm-svn: 272533
* [AVX512] Remove maksed pshufd, pshuflw, and phufhw intrinsics and ↵Craig Topper2016-06-1311-285/+238
| | | | | | autoupgrade them to selects and shufflevector. llvm-svn: 272527
* [X86] Refactor some of the X86 autoupgrade code to split mask vector and ↵Craig Topper2016-06-131-74/+69
| | | | | | select generation into routines that can be reused for future intrinsic upgrades. NFC llvm-svn: 272526
* Improved Visual Studio 2015 visualization of SmallVectorImplMike Spertus2016-06-131-2/+25
| | | | | | | | | | | | When visualizing small vectors in VS2015, show the first few elements in the DisplayString instead of the size. For example, a SmallVector of DeclAccessPair will visualize like {public typename ...Ts, public typename U} The visualization in VS2013 remains the same because we continue to include the old visualizer with a lower-than-default priority of MediumLow, and the same SmallVector would continue to be visualized as {size = 2} llvm-svn: 272525
* Untabify.NAKAMURA Takumi2016-06-131-2/+2
| | | | llvm-svn: 272523
* Use 'auto' to avoid implicit copies.Benjamin Kramer2016-06-121-1/+1
| | | | | | | | | | | | | td_type is std::pair<std::string, std::string>, but the map returns elements of std::pair<const std::string, std::string>. In well-designed languages like C++ that yields an implicit copy perfectly hidden by constref's lifetime extension. Just use auto, the typedef obscured the real type anyways. Found with a little help from clang-tidy's performance-implicit-cast-in-loop. llvm-svn: 272519
* [Verifier] Simplify code. No functionality change intended.Benjamin Kramer2016-06-121-6/+2
| | | | llvm-svn: 272517
* Run clang-tidy's performance-unnecessary-copy-initialization over LLVM.Benjamin Kramer2016-06-1215-16/+16
| | | | | | No functionality change intended. llvm-svn: 272516
* [MBP] Code cleanup /NFCXinliang David Li2016-06-121-43/+73
| | | | | | | | | | This is second patch to clean up the code. In this patch, the logic to determine block outlinining is refactored and more comments are added. llvm-svn: 272514
* Move instances of std::function.Benjamin Kramer2016-06-1217-40/+39
| | | | | | Or replace with llvm::function_ref if it's never stored. NFC intended. llvm-svn: 272513
* Pass DebugLoc and SDLoc by const ref.Benjamin Kramer2016-06-12155-2422/+2170
| | | | | | | | This used to be free, copying and moving DebugLocs became expensive after the metadata rewrite. Passing by reference eliminates a ton of track/untrack operations. No functionality change intended. llvm-svn: 272512
* [x86, SSE] change patterns for CMPP to float types to allow matching with ↵Sanjay Patel2016-06-124-72/+55
| | | | | | | | | | | | | | | | | | | | | | | | | SSE1 (PR28044) This patch is intended to solve: https://llvm.org/bugs/show_bug.cgi?id=28044 By changing the definition of X86ISD::CMPP to use float types, we allow it to be created and pass legalization for an SSE1-only target where v4i32 is not legal. The motivational trail for this change includes: https://llvm.org/bugs/show_bug.cgi?id=28001 and eventually makes this trigger: http://reviews.llvm.org/D21190 Ie, after this step, we should be free to have Clang generate FP compare IR instead of x86 intrinsics for SSE C packed compare intrinsics. (We can auto-upgrade and remove the LLVM sse.cmp intrinsics as a follow-up step.) Once we're generating vector IR instead of x86 intrinsics, a big pile of generic optimizations can trigger. Differential Revision: http://reviews.llvm.org/D21235 llvm-svn: 272511
* [X86] Remove sse2 pshufd/pshuflw/pshufhw intrinsics and upgrade them to ↵Craig Topper2016-06-126-65/+71
| | | | | | shufflevector. llvm-svn: 272510
* [RegUsageInfoCollector] Drop unneccesary const_cast. NFC.Benjamin Kramer2016-06-121-2/+1
| | | | llvm-svn: 272509
OpenPOWER on IntegriCloud