summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Headers: Add ARM support to intrin.h for MSVC compatibilitySaleem Abdulrasool2016-08-064-0/+54
| | | | | | | | | | | | | | | | | This fixes compiling with headers from the Windows SDK for ARM, where the YieldProcessor function (in winnt.h) refers to _ARM_BARRIER_ISHST. The actual MSVC armintr.h contains a lot more definitions, but this is enough to build code that uses the Windows SDK but doesn't use ARM intrinsics directly. An alternative would to just keep the addition to intrin.h (to include armintr.h), but not actually ship armintr.h, instead having clang's intrin.h include armintr.h from MSVC's include directory. (That one works fine with clang, at least for building code that uses the Windows SDK.) Patch by Martin Storsjö! llvm-svn: 277928
* [libfuzzer] do not warn about missing pcbuffer functions: they are new.Mike Aizatsky2016-08-061-2/+2
| | | | llvm-svn: 277927
* Unpollute the global namespace. lld edition.Benjamin Kramer2016-08-064-1/+9
| | | | llvm-svn: 277926
* [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
* [ASTReader] Use real move semantics instead of emulating them in the copy ctor.Benjamin Kramer2016-08-061-3/+3
| | | | | | No functionality change intended. llvm-svn: 277923
* [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
* [Sema] Make switch fully covered again.Benjamin Kramer2016-08-061-1/+2
| | | | llvm-svn: 277920
* [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-063-3/+6
| | | | llvm-svn: 277918
* [StaticAnalyzer] Remove dead code.Benjamin Kramer2016-08-062-48/+0
| | | | llvm-svn: 277917
* 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
* [ELF][MIPS] Produce a correct and complete set of MIPS ELF header flagsSimon Atanasyan2016-08-063-15/+250
| | | | | | | | | | | | | | | | | | The patch extends the `getMipsEFlags` function. Now in that function we iterate over all object files, parse ELF header flags and merge them. If a file is incompatible with previously analyzed ones we show an error or warning. That can happen if, for example, we try to link files with incompatible ABI, ISA, NAN encoding etc. There is an alternative solution. We can check and merge flags and reject incompatible input modules in the `isCompatible` function which is called from the `SymbolTable::addFile` method. But in that case we have to save and keep somewhere a merged ELF flags combination to use it later in the writer. Differential Revision: http://reviews.llvm.org/D23161 llvm-svn: 277911
* [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
* [NFC] Silence noisy -Wreturn-type warningsErik Pilkington2016-08-061-1/+1
| | | | llvm-svn: 277906
* 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
* Fix typos from r277797 and unused variable from r277889.Richard Trieu2016-08-062-7/+4
| | | | llvm-svn: 277900
* [sanitizer] allocator: move TransferBatch into ↵Kostya Serebryany2016-08-065-100/+154
| | | | | | SizeClassAllocator64/SizeClassAllocator32 because we actually need different iplementations for the 64- and 32-bit case. NFC; the following patches will make the TransferBatch implementations differ llvm-svn: 277899
* Try to fix the ill.cc test on LinuxReid Kleckner2016-08-061-0/+2
| | | | llvm-svn: 277898
* The lack of classes in the hash table is not an error - it's very ↵Enrico Granata2016-08-061-1/+1
| | | | | | legitimately possible for a process to define no ObjC classes of its own. Discovered by debugging /bin/ls llvm-svn: 277897
* [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 Windows build - add return statement in ↵Oleksiy Vyalov2016-08-061-1/+1
| | | | | | SBThread::StepUsingScriptedThreadPlan. llvm-svn: 277895
* Use %stdcxx11 instead of -std=c++11 so the test passes with VS 2015Reid Kleckner2016-08-061-1/+1
| | | | llvm-svn: 277894
* 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
* Mention the scripted thread plans in the python reference.Jim Ingham2016-08-051-0/+112
| | | | llvm-svn: 277890
* Fix two false positives in -Wreturn-stack-addressRichard Trieu2016-08-052-1/+76
| | | | | | | | | | | If the return type is a pointer and the function returns the reference to a pointer, don't warn since only the value is returned, not the reference. If a reference function parameter appears in the reference chain, don't warn since binding happens at the caller scope, so addresses returned are not to local stack. This includes default arguments as well. llvm-svn: 277889
* 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
* [NFC][ObjC Availability] Refactor DiagnoseAvailabilityOfDeclErik Pilkington2016-08-055-98/+101
| | | | | | Differential revision: https://reviews.llvm.org/D23221 llvm-svn: 277887
* Disable a few more flaky asan64 tests.Nico Weber2016-08-051-0/+12
| | | | llvm-svn: 277886
* [clang-tblgen] Remove unused #include (NFC)Vedant Kumar2016-08-051-1/+0
| | | | llvm-svn: 277885
* Mention is_stale in the scripted step doc.Jim Ingham2016-08-051-7/+29
| | | | llvm-svn: 277884
* [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
* Disable a few win asan64 tests that don't reliably pass, ↵Nico Weber2016-08-051-0/+12
| | | | | | https://reviews.llvm.org/D23230 llvm-svn: 277882
* 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
* Add a few more needed bits to the scripted thread plans.Jim Ingham2016-08-0511-4/+94
| | | | llvm-svn: 277879
OpenPOWER on IntegriCloud