summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Revert "[LoopSimplify] Fix updating LCSSA after separating nested ↵Michael Zolotukhin2016-08-072-1/+48
| | | | | | | | | loops."" This reverts commit r277901. Reaaply the commit as it looks like it has nothing to do with the bots failures. llvm-svn: 277946
* [ExecutionEngine][RuntimeDyld] Move JITSymbol from ExecutionEngine to ↵Lang Hames2016-08-073-1/+1
| | | | | | | | | RuntimeDyld. JITSymbol really belongs in RuntimeDyld. This should fix the llvm-rtdyld link failures caused by r277943. llvm-svn: 277945
* [RuntimeDyld] Remove symbol that is unused as of r277943.Lang Hames2016-08-071-1/+0
| | | | llvm-svn: 277944
* [RuntimeDyld] Replace manual flag checks with JITSymbolFlags::fromObjectSymbol.Lang Hames2016-08-071-13/+5
| | | | llvm-svn: 277943
* [ORC] Re-apply r277896, removing bogus triples and datalayouts that broke testsLang Hames2016-08-067-27/+68
| | | | | | on linux last time. llvm-svn: 277942
* [libFuzzer] make libFuzzer work with a bit older clang versionsKostya Serebryany2016-08-061-8/+10
| | | | llvm-svn: 277941
* [libFuzzer] don't print bogus error messageKostya Serebryany2016-08-061-2/+3
| | | | llvm-svn: 277940
* [X86][AVX2] Improve sign/zero extension on AVX2 targetsSimon Pilgrim2016-08-063-31/+25
| | | | | | Split extensions to large vectors into 256-bit chunks - the equivalent of what we do with pre-AVX2 into 128-bit chunks llvm-svn: 277939
* CoroSplit: Squash unused variable FnTrigger warning in NDEBUGGor Nishanov2016-08-061-0/+2
| | | | llvm-svn: 277938
* [Coroutines] Passify the build bots. Remove restart-trigger.ll test for nowGor Nishanov2016-08-061-16/+0
| | | | llvm-svn: 277937
* [Coroutines] Part 5: Add CGSCC restart triggerGor Nishanov2016-08-067-8/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: CoroSplit pass processes the coroutine twice. First, it lets it go through complete IPO optimization pipeline as a single function. It forces restart of the pipeline by inserting an indirect call to an empty function "coro.devirt.trigger" which is devirtualized by CoroElide pass that triggers a restart of the pipeline by CGPassManager. (In later patches, when CoroSplit pass sees the same coroutine the second time, it splits it up, adds coroutine subfunctions to the SCC to be processed by IPO pipeline.) Documentation and overview is here: http://llvm.org/docs/Coroutines.html. Upstreaming sequence (rough plan) 1.Add documentation. (https://reviews.llvm.org/D22603) 2.Add coroutine intrinsics. (https://reviews.llvm.org/D22659) 3.Add empty coroutine passes. (https://reviews.llvm.org/D22847) 4.Add coroutine devirtualization + tests. ab) Lower coro.resume and coro.destroy (https://reviews.llvm.org/D22998) c) Do devirtualization (https://reviews.llvm.org/D23229) 5.Add CGSCC restart trigger + tests. <= we are here 6.Add coroutine heap elision + tests. 7.Add the rest of the logic (split into more patches) Reviewers: mehdi_amini, majnemer Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D23234 llvm-svn: 277936
* [AVX-512] Add SQRT/RCP14/RNDSCALE to hasUndefRegUpdate.Craig Topper2016-08-061-0/+16
| | | | llvm-svn: 277934
* [AVX-512] Add AVX-512 scalar CVT instructions to hasUndefRegUpdate.Craig Topper2016-08-063-67/+71
| | | | llvm-svn: 277933
* [AVX-512] Add AVX512 run line to a test and re-generate the checks. Future ↵Craig Topper2016-08-061-265/+835
| | | | | | commits will refine some of the sequences. llvm-svn: 277932
* [X86] Add VRCPSSr_Int, VRSQRTSSr_Int, VSQRTSSr_Int, and VSQRTSDr_Int to ↵Craig Topper2016-08-061-0/+4
| | | | | | hasUndefRegUpdate. llvm-svn: 277931
* [X86][SSE] Enable commutation between MOVHLPS and UNPCKHPDSimon Pilgrim2016-08-067-23/+35
| | | | | | | | Assuming SSE2 is available then we can safely commute between these, removing some unnecessary register moves and improving memory folding opportunities. VEX encoded versions don't benefit so I haven't added support to them. llvm-svn: 277930
* [libfuzzer] do not warn about missing pcbuffer functions: they are new.Mike Aizatsky2016-08-061-2/+2
| | | | llvm-svn: 277927
* [X86][SSE] Regenerate SSE1 shuffle testsSimon Pilgrim2016-08-061-2/+2
| | | | llvm-svn: 277925
* [ARM] Don't copy MCInsts in loop. NFC.Benjamin Kramer2016-08-061-1/+1
| | | | llvm-svn: 277924
* [Inliner] Use function_ref for functors which are never taken ownership of.Benjamin Kramer2016-08-061-5/+5
| | | | llvm-svn: 277922
* [LoadCombine] Simplify code with a brace init. NFC.Benjamin Kramer2016-08-061-4/+1
| | | | llvm-svn: 277921
* [X86][SSE] Add 2 input shuffle support to matchBinaryVectorShuffle Simon Pilgrim2016-08-061-12/+20
| | | | | | Not actually used yet... llvm-svn: 277919
* Move helpers into anonymous namespaces. NFC.Benjamin Kramer2016-08-0615-24/+32
| | | | llvm-svn: 277916
* [CodeGen] Fix a -Wdocumentation warningDavid Majnemer2016-08-061-1/+1
| | | | | | | A parameter was documented with the wrong name. No functionality change is intended. llvm-svn: 277915
* [ValueTracking] Teach computeKnownBits about [su]min/maxDavid Majnemer2016-08-064-8/+69
| | | | | | | Reasoning about a select in terms of a min or max allows us to derive a tigher bound on the result. llvm-svn: 277914
* [CallGraphSCCPass] Use an ArrayRef instead of a pair of iteratorsDavid Majnemer2016-08-062-3/+3
| | | | | | No functional change is intended. llvm-svn: 277913
* [ADT] Make the triple test 1000x faster through more focused test cases.Chandler Carruth2016-08-061-53/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current approach isn't a long-term viable pattern. Given the set of architectures A, vendors V, operating systems O, and environments E, it does |A| * |V| * |O| * |E| * 4! tests. As LLVM grows, this test keeps getting slower, despite my working very hard to make it get some "optimizations" even in -O0 builds in order to lower the constant factors. Fundamentally, we're doing an unreasonable amount of work.i Looking at the specific thing being tested -- the goal seems very clearly to be testing the *permutations*, not the *combinations*. The combinations are driving up the complexity much more than anything else. Instead, test every possible value for a given triple entry in every permutation of *some* triple. This really seems to cover the core goal of the test. Every single possible triple component is tested in every position. But because we keep the rest of the triple constant, it does so in a dramatically more scalable amount of time. With this model we do (|A| + |V| + |O| + |E|) * 4! tests. For me on a debug build, this goes from running for 19 seconds to 19 milliseconds, or a 1000x improvement. This makes a world of difference for the critical path of 'ninja check-llvm' and other extremely common workflows. Thanks to Renato, Dean, and David for the helpful review comments and helping me refine the explanation of the change. Differential Revision: https://reviews.llvm.org/D23156 llvm-svn: 277912
* [InstCombine] Don't coerce non-integral pointers to integersSanjoy Das2016-08-063-1/+35
| | | | | | | | | | Reviewers: majnemer Subscribers: mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D23231 llvm-svn: 277910
* Revert "(refs/bisect/bad) GVN-hoist: enable by default"Matthias Braun2016-08-062-3/+2
| | | | | | | | | | | GVN-Hoist appears to miscompile llvm-testsuite SingleSource/Benchmarks/Misc/fbench.c at the moment. I filed http://llvm.org/PR28880 This reverts commit r277786. llvm-svn: 277909
* Part 4c: Coroutine Devirtualization: Devirtualize coro.resume and coro.destroy.Gor Nishanov2016-08-069-38/+288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the 4c patch of the coroutine series. CoroElide pass now checks if PostSplit coro.begin is referenced by coro.subfn.addr intrinsics. If so replace coro.subfn.addrs with an appropriate coroutine subfunction associated with that coro.begin. Documentation and overview is here: http://llvm.org/docs/Coroutines.html. Upstreaming sequence (rough plan) 1.Add documentation. (https://reviews.llvm.org/D22603) 2.Add coroutine intrinsics. (https://reviews.llvm.org/D22659) 3.Add empty coroutine passes. (https://reviews.llvm.org/D22847) 4.Add coroutine devirtualization + tests. ab) Lower coro.resume and coro.destroy (https://reviews.llvm.org/D22998) c) Do devirtualization <= we are here 5.Add CGSCC restart trigger + tests. 6.Add coroutine heap elision + tests. 7.Add the rest of the logic (split into more patches) Reviewers: majnemer Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D23229 llvm-svn: 277908
* Revert r277896.Nico Weber2016-08-067-74/+27
| | | | | | | | | | | | | | | | It breaks ExecutionEngine/OrcLazy/weak-function.ll on most bots. Script: -- ... -- Exit Code: 1 Command Output (stderr): -- Could not find main function. llvm-svn: 277907
* CodeGen: If Convert blocks that would form a diamond when tail-merged.Kyle Butt2016-08-062-70/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following function currently relies on tail-merging for if conversion to succeed. The common tail of cond_true and cond_false is extracted, and this then forms a diamond pattern that can be successfully if converted. If this block does not get extracted, either because tail-merging is disabled or the threshold is higher, we should still recognize this pattern and if-convert it. define i32 @t2(i32 %a, i32 %b) nounwind { entry: %tmp1434 = icmp eq i32 %a, %b ; <i1> [#uses=1] br i1 %tmp1434, label %bb17, label %bb.outer bb.outer: ; preds = %cond_false, %entry %b_addr.021.0.ph = phi i32 [ %b, %entry ], [ %tmp10, %cond_false ] %a_addr.026.0.ph = phi i32 [ %a, %entry ], [ %a_addr.026.0, %cond_false ] br label %bb bb: ; preds = %cond_true, %bb.outer %indvar = phi i32 [ 0, %bb.outer ], [ %indvar.next, %cond_true ] %tmp. = sub i32 0, %b_addr.021.0.ph %tmp.40 = mul i32 %indvar, %tmp. %a_addr.026.0 = add i32 %tmp.40, %a_addr.026.0.ph %tmp3 = icmp sgt i32 %a_addr.026.0, %b_addr.021.0.ph br i1 %tmp3, label %cond_true, label %cond_false cond_true: ; preds = %bb %tmp7 = sub i32 %a_addr.026.0, %b_addr.021.0.ph %tmp1437 = icmp eq i32 %tmp7, %b_addr.021.0.ph %indvar.next = add i32 %indvar, 1 br i1 %tmp1437, label %bb17, label %bb cond_false: ; preds = %bb %tmp10 = sub i32 %b_addr.021.0.ph, %a_addr.026.0 %tmp14 = icmp eq i32 %a_addr.026.0, %tmp10 br i1 %tmp14, label %bb17, label %bb.outer bb17: ; preds = %cond_false, %cond_true, %entry %a_addr.026.1 = phi i32 [ %a, %entry ], [ %tmp7, %cond_true ], [ %a_addr.026.0, %cond_false ] ret i32 %a_addr.026.1 } Without tail-merging or diamond-tail if conversion: LBB1_1: @ %bb @ =>This Inner Loop Header: Depth=1 cmp r0, r1 ble LBB1_3 @ BB#2: @ %cond_true @ in Loop: Header=BB1_1 Depth=1 subs r0, r0, r1 cmp r1, r0 it ne cmpne r0, r1 bgt LBB1_4 LBB1_3: @ %cond_false @ in Loop: Header=BB1_1 Depth=1 subs r1, r1, r0 cmp r1, r0 bne LBB1_1 LBB1_4: @ %bb17 bx lr With diamond-tail if conversion, but without tail-merging: @ BB#0: @ %entry cmp r0, r1 it eq bxeq lr LBB1_1: @ %bb @ =>This Inner Loop Header: Depth=1 cmp r0, r1 ite le suble r1, r1, r0 subgt r0, r0, r1 cmp r1, r0 bne LBB1_1 @ BB#2: @ %bb17 bx lr llvm-svn: 277905
* IfConverter: Split ScanInstructions into 2 functions.Kyle Butt2016-08-061-13/+27
| | | | | | | | | | ScanInstructions is now 2 functions: AnalyzeBranches and ScanInstructions. ScanInstructions also now takes a pair of arguments delimiting the instructions to be scanned. This will be used for forked diamond support to re-scan only a portion of the block. llvm-svn: 277904
* IfConversion: Document countDuplicatedInstructions. NFCKyle Butt2016-08-061-0/+12
| | | | llvm-svn: 277903
* IfConversion: factor out 2 functions to skip debug instrs. NFCKyle Butt2016-08-061-24/+32
| | | | | | Skipping debug instructions occurrs repeatedly, factor it out. llvm-svn: 277902
* Revert "[LoopSimplify] Fix updating LCSSA after separating nested loops."Michael Zolotukhin2016-08-062-48/+1
| | | | | | | This reverts commit r277877. Try to appease clang-x64-ninja-win7 buildbot. llvm-svn: 277901
* [ORC] Add (partial) weak symbol support to the CompileOnDemand layer.Lang Hames2016-08-067-27/+74
| | | | | | | | | | | | | | This adds partial support for weak functions to the CompileOnDemandLayer by modifying the addLogicalModule method to check for existing stub definitions before building a new stub for a weak function. This scheme is sufficient to support ODR definitions, but fails for general weak definitions if strong definition is encountered after the first weak definition. (A more extensive refactor will be required to fully support weak symbols). This patch does *not* add weak symbol support to RuntimeDyld: I hope to add that in the near future. llvm-svn: 277896
* Fix a -Wunused-const-variable due to a bug in clang.Zachary Turner2016-08-061-3/+8
| | | | llvm-svn: 277893
* [IRCE] Remove unused headers; NFCSanjoy Das2016-08-061-7/+0
| | | | llvm-svn: 277892
* [IRCE] Preserve loop-simplify formSanjoy Das2016-08-063-4/+16
| | | | | | | | Fixes PR28764. Right now there is no way to test this, but (as mentioned on the PR) with Michael Zolotukhin's yet to be checked in LoopSimplify verfier, 8 of the llvm-lit tests for IRCE crash. llvm-svn: 277891
* Resubmit "Make YAML support SmallVector"Zachary Turner2016-08-052-49/+45
| | | | | | | | | | | | | | | | | | | | | | | This resubmits a3770391c5fb64108d565e12f61dd77ce71b5b4f, which was reverted due to breakages on non-Windows machines. Due to differences in template instantiation rules on Microsoft and non-Microsoft platforms, a member access restriction was triggering on non-Microsoft compilers. Previously, a friend declaration for std::vector<> had been introduced into the DebugMap class to make the member access restriction pass, but the introduction of support for SmallVector<> meant that an additional friend declaration would need to be added. This didn't really make a lot of sense since the user of the macro is probably only using one type (SmallVector<>, vector<>, etc) and we could in theory add support for even more types to this macro in the future (e.g. std::deque), so rather than add another friend declaration, I just made the type being referenced a public nested typedef instead of a private nested typedef. llvm-svn: 277888
* [InstCombine] refactor ctlz/cttz folds (NFCI)Sanjay Patel2016-08-051-34/+33
| | | | | | | | | | Note that this fold really belongs in InstSimplify. Refactoring here anyway as an intermediate step because there's a planned addition to this function in D23134. Differential Revision: https://reviews.llvm.org/D23223 llvm-svn: 277883
* Revert "Make YAML support SmallVector"Justin Bogner2016-08-051-44/+47
| | | | | | | | | This breaks building dsymutil, causing my local build and many bots to fail. This reverts r277870. llvm-svn: 277881
* [MSSA] Use depth first iterator instead of custom version.Daniel Berlin2016-08-051-19/+3
| | | | | | | | | | | | | | | | | Summary: Originally the plan was to use the custom worklist to do some block popping, and because we don't actually need a visited set. The custom one we have here is slightly broken, and it's not worth fixing vs using depth_first_iterator since we aren't going to go the route we originally were. Fixes PR28874 Reviewers: george.burgess.iv Subscribers: llvm-commits, gberry Differential Revision: https://reviews.llvm.org/D23187 llvm-svn: 277880
* CodeView: Remove an unused variableJustin Bogner2016-08-051-1/+0
| | | | | | It was breaking the -Werror build. llvm-svn: 277878
* [LoopSimplify] Fix updating LCSSA after separating nested loops.Michael Zolotukhin2016-08-052-1/+48
| | | | | | | | | This fixes PR28825. The problem was that we only checked if a value from a created inner loop is used in the outer loop, and fixed LCSSA for them. But we missed to fixup LCSSA for values used in exits of the outer loop. llvm-svn: 277877
* Fix non portable include path.Zachary Turner2016-08-051-1/+1
| | | | llvm-svn: 277876
* PowerPC: Add a triple to this testJustin Bogner2016-08-051-1/+1
| | | | | | This is running opt without specifying a triple, which isn't correct. llvm-svn: 277875
* [MSSA] Match assert vs llvm_unreachable style in verification functions.Daniel Berlin2016-08-051-11/+12
| | | | llvm-svn: 277873
* Rewrite domination verifier to handle local domination as well.Daniel Berlin2016-08-052-38/+23
| | | | | | | | | | | | | | Summary: Rewrite domination verifier to handle local domination as well. This catches a bug Geoff Berry noticed. Reviewers: george.burgess.iv Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D23184 llvm-svn: 277872
OpenPOWER on IntegriCloud