summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SelectionDAG] Remove exit-on-error flag from test (PR27765)Diana Picus2016-06-143-3/+20
| | | | | | | | | | | | | | | | The exit-on-error flag in the ARM test is necessary in order to avoid an unreachable in the DAGTypeLegalizer, when trying to expand a physical register. We can also avoid this situation by introducing a bitcast early on, where the invalid scalar-to-vector conversion is detected. We also add a test for PowerPC, which goes through a similar code path in the SelectionDAGBuilder. Fixes PR27765. Differential Revision: http://reviews.llvm.org/D21061 llvm-svn: 272644
* re-generate the tests using the update_llc_test_checks.py script Igor Breger2016-06-148-684/+1137
| | | | llvm-svn: 272643
* Update errcat.objects tests so they test the bug fixed in r272640.Eric Fiselier2016-06-142-6/+11
| | | | llvm-svn: 272642
* Fix syntax error in r272640.Eric Fiselier2016-06-141-1/+2
| | | | llvm-svn: 272641
* Fix error checking for strerror_r implementations that return the error code.Eric Fiselier2016-06-141-2/+4
| | | | llvm-svn: 272640
* Avoid octal escape sequence warning with MSVC. Patch from STL@microsoft.comEric Fiselier2016-06-142-3/+3
| | | | llvm-svn: 272639
* Add missing includeEric Fiselier2016-06-141-0/+2
| | | | llvm-svn: 272638
* Temporarily XFAIL variadic lock_guard mangling test for GCC 4.9Eric Fiselier2016-06-141-1/+5
| | | | llvm-svn: 272637
* Add support to PlatformRemoteiOS, PlatformRemoteAppleWatch, andJason Molenda2016-06-143-0/+210
| | | | | | | | | | | | | | | | | | | | PlatformRemoteAppleTV to check the target.exec-search-paths directories for files after looking in the SDK. An additional wrinkle is that the remote file path may be something like ".../UIFoundation.framework/UIFoundation" and in target.exec-search-paths we will have "UIFoundation.framework". Looking for just the filename of the path is not sufficient - we need to also look for it by the parent directories because this may be a darwin bundle/framework like the UIFoundation example. We really need to make a PlatformRemoteAppleDevice and have PlatformRemoteiOS, PlatformRemoteAppleWatch, and PlatformRemoteAppleTV inherit from it. These three classes are 98% identical code. <rdar://problem/25976619> llvm-svn: 272635
* Implement variadic lock_guard.Eric Fiselier2016-06-1413-32/+550
| | | | | | | | | | | | | | | | | | | | Summary: This patch implements the variadic `lock_guard` paper. Making `lock_guard` variadic is a ABI breaking change because the specialization `lock_guard<_Mutex>` mangles differently then when it was the primary template. This change only provides variadic `lock_guard` in ABI V2 or when `_LIBCPP_ABI_VARIADIC_LOCK_GUARD` is defined. Note that in ABI V2 `lock_guard` must always be declared as a variadic template, even in C++03, in order to keep the ABI consistent. For this reason `lock_guard` is forward declared as a variadic template in all standard dialects and therefore depends on variadic templates being provided as an extension in C++03. All supported versions of Clang and GCC provide this extension. Reviewers: mclow.lists Subscribers: K-ballo, mclow.lists, cfe-commits Differential Revision: http://reviews.llvm.org/D21260 llvm-svn: 272634
* Make system_error::message() thread safe. Fixes PR25598.Eric Fiselier2016-06-143-1/+71
| | | | | | | | | | | | | | | | | | | | Summary: system_error::message() uses `strerror` for the generic and system categories. This function is not thread safe. The fix is to use `strerror_r`. It has been available since 2001 for GNU libc and since BSD 4.4 on FreeBSD/OS X. On platforms with GNU libc the extended version is used which always returns a valid string, even if an error occurs. In single-threaded builds `strerror` is still used. See https://llvm.org/bugs/show_bug.cgi?id=25598 Reviewers: majnemer, mclow.lists Subscribers: erik65536, cfe-commits, emaste Differential Revision: http://reviews.llvm.org/D20903 llvm-svn: 272633
* Ignore depricated warnings from <ext/hash_map> and <ext/hash_set>Eric Fiselier2016-06-142-0/+10
| | | | llvm-svn: 272632
* Fix PR28100 - Allow redeclarations of deleted explicit specializations.Faisal Vali2016-06-142-6/+32
| | | | | | | | | | | | See https://llvm.org/bugs/show_bug.cgi?id=28100. In r266561 when I implemented allowing explicit specializations of function templates to override deleted status, I mistakenly assumed (and hence introduced a violable assertion) that when an explicit specialization was being declared, the corresponding specialization of the most specialized function template that it would get linked to would always be the one that was implicitly generated - and so if it was marked as 'deleted' it must have inherited it from the primary template and so should be safe to reset its deleted status, and set it to being an explicit specialization. Obviously during redeclaration of a deleted explicit specialization, in order to avoid a recursive reset, we need to check that the previous specialization is not an explicit specialization (instead of assuming and asserting it) and that it hasn't been referenced, and so only then is it safe to reset its 'deleted' status. All regression tests pass. Thanks to Zhendong Su for reporting the bug and David Majnemer for tracking it to my commit r266561, and promptly bringing it to my attention. llvm-svn: 272631
* [PM] Port Mem2Reg to the new pass manager.Davide Italiano2016-06-147-52/+100
| | | | llvm-svn: 272630
* Fix warnings in tests.Eric Fiselier2016-06-1412-42/+52
| | | | llvm-svn: 272629
* [Parser] Handle __pragma(pack, etc. after type definitionsDavid Majnemer2016-06-143-0/+27
| | | | | | | | | Support certain MS pragmas right after the closing curly brace of a class. Clang did not expect __pragma in this position. This fixes PR28094. llvm-svn: 272628
* [AVX512] Use AND32ri8 instead of AND32ri when anding with 1 to create single ↵Craig Topper2016-06-141-9/+9
| | | | | | bit masks. This results in a smaller encoding. llvm-svn: 272627
* [AVX512] Use MOVZX32 instead of MOVZ16 for loading single v8/v4/v2/v1 masks ↵Craig Topper2016-06-145-16/+16
| | | | | | when KMOVB is not available. This has better behavior with respect to partial register stalls since it won't need to preserve the upper 16-bits of the GPR. llvm-svn: 272626
* [AVX512] Add patterns for zero-extending a mask that use the def of ↵Craig Topper2016-06-143-7/+6
| | | | | | KMOVW/KMOVB without going through an EXTRACT_SUBREG and a MOVZX. llvm-svn: 272625
* [AVX512] Add tests for zero extending masks that show an unnecessary movzx ↵Craig Topper2016-06-141-26/+778
| | | | | | instruction. A followup patch will remove that instruction, but adding the tests first to make the more obvious. llvm-svn: 272624
* Detect recursive default argument definitionSerge Pavlov2016-06-143-0/+12
| | | | | | | | | | | | If definition of default function argument uses itself, clang crashed, because corresponding function parameter is not associated with the default argument yet. With this fix clang emits appropriate error message. This change fixes PR28105. Differential Revision: http://reviews.llvm.org/D21301 llvm-svn: 272623
* Remove unused local var. Patch from STL@microsoft.comEric Fiselier2016-06-141-1/+1
| | | | llvm-svn: 272622
* Prevent truncation warning. Patch from STL@microsoft.comEric Fiselier2016-06-141-1/+1
| | | | llvm-svn: 272621
* Fix vector<bool> tests that were using ints. Patch from STL@microsoft.comEric Fiselier2016-06-145-17/+17
| | | | llvm-svn: 272620
* Rename variables to prevent shadowing. Patch from STL@microsoft.comEric Fiselier2016-06-1432-372/+372
| | | | llvm-svn: 272619
* Avoid name shadowing in test. Patch from STL@microsoft.comEric Fiselier2016-06-141-2/+2
| | | | llvm-svn: 272618
* Silence more unused variable warnings. Patch from STL@microsoft.comEric Fiselier2016-06-141-0/+8
| | | | llvm-svn: 272617
* 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
* Remove _LIBCPP_TRIVIAL_PAIR_COPY_CTOR option.Eric Fiselier2016-06-145-34/+102
| | | | llvm-svn: 272613
* 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
* Remove stray semi-colon in *.py file, NFCVedant Kumar2016-06-141-1/+1
| | | | llvm-svn: 272610
* Remove nonsense and simplify. To forward a reference, we always just load theRichard Smith2016-06-141-14/+6
| | | | | | | | | | | pointer-to-pointer representing the parameter. An aggregate rvalue representing a pointer does not make sense. We got away with this weirdness because CGCall happens to blindly load an RValue in aggregate form in this case, without checking whether an RValue for the type should be in scalar or aggregate form. llvm-svn: 272609
* 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
* Add a test to ensure that pass_object_size is handled properly by a delegate ↵Richard Smith2016-06-141-0/+10
| | | | | | constructor. llvm-svn: 272605
* [docs] Coverage: Document the profile merge pool specifierVedant Kumar2016-06-141-0/+8
| | | | llvm-svn: 272604
* 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
* Update numbers.Rui Ueyama2016-06-131-2/+3
| | | | llvm-svn: 272596
* [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
OpenPOWER on IntegriCloud