summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [yaml2obj] Missed updating a few test cases in r273915Chris Bieneman2016-06-272-4/+4
| | | | | | This should fix the broken bots. llvm-svn: 273918
* [lld][MachO] Remove stray comment.Lang Hames2016-06-271-2/+0
| | | | llvm-svn: 273917
* AMDGPU: Fix verifier errors with undef vector indicesMatt Arsenault2016-06-273-27/+385
| | | | | | Also fix pointlessly adding exec to liveins. llvm-svn: 273916
* [yaml2obj] Remove --format option in favor of YAML tagsChris Bieneman2016-06-2776-208/+261
| | | | | | | | | | | | | | | | | | | | | | Summary: Our YAML library's handling of tags isn't perfect, but it is good enough to get rid of the need for the --format argument to yaml2obj. This patch does exactly that. Instead of requiring --format, it infers the format based on the tags found in the object file. The supported tags are: !ELF !COFF !mach-o !fat-mach-o I have a corresponding patch that is quite large that fixes up all the in-tree test cases. Reviewers: rafael, Bigcheese, compnerd, silvas Subscribers: compnerd, llvm-commits Differential Revision: http://reviews.llvm.org/D21711 llvm-svn: 273915
* Parse the triple in base-config-ix to propagate ANDROID variable correctlySumanth Gundapaneni2016-06-272-12/+13
| | | | | | | | | | | The triple must be parsed in base-config-ix.cmake. Otherwise, the cmake variable ANDROID won't be set and this will confuse cmake to build unsupported targets targeted for android. Diferential revision: http://reviews.llvm.org/D21474 llvm-svn: 273914
* Add simple, stupid, pattern-based fuzzer / reducer for modules bugs. I'veRichard Smith2016-06-271-0/+166
| | | | | | | already used this to find and reduce quite a few bugs, and it works pretty well if you can find the right patterns. llvm-svn: 273913
* Verifier: Reject non-float !fpmathMatt Arsenault2016-06-273-2/+7
| | | | | | | Code already assumes this is float. getFPAccuracy() crashes on any other type. llvm-svn: 273912
* [ExprConstant] Fix PR28314 - crash while evluating objectsize.George Burgess IV2016-06-272-10/+42
| | | | | | | | | | | | | | | | | | | | | This fixes a crash in code like: ``` struct A { struct B b; char c[1]; } int foo(struct A* a) { return __builtin_object_size(a->c, 0); } ``` We wouldn't check whether the structs we were examining were invalid, and getting the layout of an invalid struct is (unsurprisingly) A Bad Thing. With this patch, we'll always return conservatively if we see an invalid struct, since I'm assuming the presence of an invalid struct means that our compilation failed (so having a conservative result isn't such a big deal). llvm-svn: 273911
* clang-rename: add a -export-fixes optionMiklos Vajna2016-06-272-0/+38
| | | | | | | | | | | | | | | | | | Use case: a class is declared in a header, and defined in two translation units. clang-rename is asked to rename a class member that's referenced in both translation units. Using -i is not possible, as in case the first clang-rename invocation touches the header, the second invocation will result in compilation errors. Using -export-fixes handles this situation, each invocation can work on the original source, and at the end the user can apply the replacements with clang-apply-replacements. Reviewers: klimek Differential Revision: http://reviews.llvm.org/D21676 llvm-svn: 273910
* DAGCombiner: Don't narrow volatile vector loads + extractMatt Arsenault2016-06-272-3/+42
| | | | llvm-svn: 273909
* [OpenMP] Diagnose missing cases of statements between target and teams ↵Kelvin Li2016-06-272-0/+9
| | | | | | | | | | | | | | | directives Clang fails to diagnose cases such as #pragma omp target while(0) { #pragma omp teams {} } A patch by David Sheinkman. llvm-svn: 273908
* Use isPositionIndependent(). NFC.Rafael Espindola2016-06-271-2/+2
| | | | llvm-svn: 273907
* Add comment on why loops/regions can overlap. NFC.Michael Kruse2016-06-271-0/+29
| | | | | | | The case is described in llvm.org/PR28071 which was fixed in the previous commit. llvm-svn: 273906
* Fix assertion due to loop overlap with nonaffine region.Michael Kruse2016-06-274-1/+192
| | | | | | | | | | | | Reject and report regions that contains loops overlapping nonaffine region. This situation typically happens in the presence of inifinite loops. This addresses bug llvm.org/PR28071. Differential Revision: http://reviews.llvm.org/D21312 Contributed-by: Huihui Zhang <huihuiz@codeaurora.org> llvm-svn: 273905
* [InstCombine] refactor sdiv by APInt transforms (NFC)Sanjay Patel2016-06-271-9/+10
| | | | | | | There's at least one more fold to do here: https://llvm.org/bugs/show_bug.cgi?id=28153 llvm-svn: 273904
* Use isPositionIndependent(). NFC.Rafael Espindola2016-06-272-5/+3
| | | | llvm-svn: 273903
* [CFLAA] Use unsigned numbers for bit-shifts.George Burgess IV2016-06-271-1/+1
| | | | | | | | | This uses `1U` instead of `1ULL` because StratifiedAttrs is a 32-bit bitset. Thanks to Hans-Bernhard Broker for bringing this up. llvm-svn: 273902
* Factor out buildMemorySSA from getWalker.Daniel Berlin2016-06-272-9/+12
| | | | | | NFC. llvm-svn: 273901
* Refactor duplicated condition.Rafael Espindola2016-06-271-4/+3
| | | | llvm-svn: 273900
* X86 Lowering - Fixed a crash in ICMP scalar instructionElena Demikhovsky2016-06-272-4/+33
| | | | | | | | Fixed a bug in EmitTest() function in combining shl + icmp. https://llvm.org/bugs/show_bug.cgi?id=28119 llvm-svn: 273899
* Fix the Windows build after r273599Hans Wennborg2016-06-273-1/+8
| | | | | | | | | | | | | | That patch made all LLVM projects build with -DUNICODE. However, this doesn't work for the OpenMP runtime. But just overriding the flag with -UUNICODE breaks compiling ittnotify_static.c, which for some reason needs to be compiled with -DUNICIODE. Note that compiling ittnotify.h with -DUNICODE does not work though. This seems like a mess. This commit fixes it for now, but it would be great if someone who works on the OpenMP runtime could fix it properly. llvm-svn: 273898
* [InstCombine] use m_APInt for div --> ashr foldSanjay Patel2016-06-272-8/+15
| | | | | | The APInt matcher works with splat vectors, so we get this fold for vectors too. llvm-svn: 273897
* Use isPositionIndependent(). NFC.Rafael Espindola2016-06-271-3/+2
| | | | llvm-svn: 273896
* Revert -r273892 "Support arbitrary addrspace pointers in masked load/store ↵Artur Pilipenko2016-06-2712-338/+206
| | | | | | intrinsics" since some of the clang tests don't expect to see the updated signatures. llvm-svn: 273895
* [PM] Port PartialInlining to the new PMEaswaran Raman2016-06-277-23/+65
| | | | | | Differential revision: http://reviews.llvm.org/D21699 llvm-svn: 273894
* [tsan] Add HB edges for GCD barrier blocksKuba Brecka2016-06-273-48/+132
| | | | | | | | Adding support for GCD barrier blocks in concurrent queues. This uses two sync object in the same way as read-write locks do. This also simplifies the use of dispatch groups (the notifications act as barrier blocks). Differential Revision: http://reviews.llvm.org/D21604 llvm-svn: 273893
* Support arbitrary addrspace pointers in masked load/store intrinsicsArtur Pilipenko2016-06-2712-206/+338
| | | | | | | | | | | | | | This is a resubmittion of 263158 change after fixing the existing problem with intrinsics mangling (see LTO and intrinsics mangling llvm-dev thread for details). This patch fixes the problem which occurs when loop-vectorize tries to use @llvm.masked.load/store intrinsic for a non-default addrspace pointer. It fails with "Calling a function with a bad signature!" assertion in CallInst constructor because it tries to pass a non-default addrspace pointer to the pointer argument which has default addrspace. The fix is to add pointer type as another overloaded type to @llvm.masked.load/store intrinsics. Reviewed By: reames Differential Revision: http://reviews.llvm.org/D17270 llvm-svn: 273892
* [X86][SSE] Added extra broadcast tests to cover PR28327Simon Pilgrim2016-06-272-0/+53
| | | | llvm-svn: 273891
* [tsan] Treat non-barrier OSAtomic* functions as barriers to avoid false ↵Kuba Brecka2016-06-271-15/+24
| | | | | | | | | | positives The non-barrier versions of OSAtomic* functions are semantically mo_relaxed, but the two variants (e.g. OSAtomicAdd32 and OSAtomicAdd32Barrier) are actually aliases of each other, and we cannot have different interceptors for them, because they're actually the same function. Thus, we have to stay conservative and treat the non-barrier versions as mo_acq_rel. Differential Revision: http://reviews.llvm.org/D21733 llvm-svn: 273890
* [asan] fix false dynamic-stack-buffer-overflow report with constantly-sized ↵Kuba Brecka2016-06-271-0/+44
| | | | | | | | | | dynamic allocas, compiler-rt part See the bug report at https://github.com/google/sanitizers/issues/691. When a dynamic alloca has a constant size, ASan instrumentation will treat it as a regular dynamic alloca (insert calls to poison and unpoison), but the backend will turn it into a regular stack variable. The poisoning/unpoisoning is then broken. This patch will treat such allocas as static. Differential Revision: http://reviews.llvm.org/D21509 llvm-svn: 273889
* [asan] fix false dynamic-stack-buffer-overflow report with constantly-sized ↵Kuba Brecka2016-06-271-9/+10
| | | | | | | | | | dynamic allocas, LLVM part See the bug report at https://github.com/google/sanitizers/issues/691. When a dynamic alloca has a constant size, ASan instrumentation will treat it as a regular dynamic alloca (insert calls to poison and unpoison), but the backend will turn it into a regular stack variable. The poisoning/unpoisoning is then broken. This patch will treat such allocas as static. Differential Revision: http://reviews.llvm.org/D21509 llvm-svn: 273888
* [SystemZ] Avoid generating 2 XOR instructions for (and (xor x, -1), y)Zhan Jun Liau2016-06-272-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Created a pattern to match 64-bit mode (and (xor x, -1), y) to a shorter sequence of instructions. Before the change, the canonical form is translated to: xihf %r3, 4294967295 xilf %r3, 4294967295 ngr %r2, %r3 After the change, the canonical form is translated to: ngr %r3, %r2 xgr %r2, %r3 Reviewers: zhanjunl, uweigand Subscribers: llvm-commits Author: assem Committing on behalf of Assem. Differential Revision: http://reviews.llvm.org/D21693 llvm-svn: 273887
* [sanitizer] Stop unwinding the stack when a close-to-zero PC is foundKuba Brecka2016-06-275-8/+25
| | | | | | | | On OS X, we often get stack trace in a report that ends with a 0x0 frame. To get rid of it, let's trim the stack trace when we find a close-to-zero value, which is obviously not a valid PC. Differential Revision: http://reviews.llvm.org/D14656 llvm-svn: 273886
* [Hexagon] Equally-sized vectors are equivalent in ISel (except vNi1)Krzysztof Parzyszek2016-06-273-52/+51
| | | | llvm-svn: 273885
* Resubmission of http://reviews.llvm.org/D21564 after fixes.Carlo Bertolli2016-06-2738-28/+4349
| | | | | | | | | | | | | [OpenMP] Initial implementation of parse and sema for composite pragma 'distribute parallel for' This patch is an initial implementation for #distribute parallel for. The main differences that affect other pragmas are: The implementation of 'distribute parallel for' requires blocking of the associated loop, where blocks are "distributed" to different teams and iterations within each block are scheduled to parallel threads within each team. To implement blocking, sema creates two additional worksharing directive fields that are used to pass the team assigned block lower and upper bounds through the outlined function resulting from 'parallel'. In this way, scheduling for 'for' to threads can use those bounds. As a consequence of blocking, the stride of 'distribute' is not 1 but it is equal to the blocking size. This is returned by the runtime and sema prepares a DistIncrExpr variable to hold that value. As a consequence of blocking, the global upper bound (EnsureUpperBound) expression of the 'for' is not the original loop upper bound (e.g. in for(i = 0 ; i < N; i++) this is 'N') but it is the team-assigned block upper bound. Sema creates a new expression holding the calculation of the actual upper bound for 'for' as UB = min(UB, PrevUB), where UB is the loop upper bound, and PrevUB is the team-assigned block upper bound. llvm-svn: 273884
* [mips] Add instruction itineraries for LSA, DLSASimon Dardis2016-06-271-7/+6
| | | | | | | | Reviewers: vkalintiris, dsanders Differential Review: http://reviews.llvm.org/D21679 llvm-svn: 273883
* [clang-tidy] Warning enum unused using declarations.Haojian Wu2016-06-272-4/+21
| | | | | | | | | | Reviewers: alexfh, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: http://reviews.llvm.org/D21747 llvm-svn: 273882
* [GSoC 2016] New function pass DependenceInfoWrapperPassJohannes Doerfert2016-06-278-0/+140
| | | | | | | | | | | | | | This patch addresses: - A new function pass to compute polyhedral dependences. This is required to avoid the region pass manager. - Stores a map of Scop to Dependence object for all the scops present in a function. By default, access wise dependences are stored. Patch by Utpal Bora <cs14mtech11017@iith.ac.in> Differential Revision: http://reviews.llvm.org/D21105 llvm-svn: 273881
* [ARM] Fix Thumb text sections' flags under COFF/WindowsRenato Golin2016-06-272-7/+12
| | | | | | | | | | | | | | | | The main issue here is that the "thumb" flag wasn't set for some of these sections, making MSVC's link.exe fails to correctly relocate code against the symbols inside these sections. link.exe could fail for instance with the "fixup is not aligned for target 'XX'" error. If linking doesn't fail, the relocation process goes wrong in the end and invalid code is generated by the linker. This patch adds Thumb/ARM information so that the right flags are set on COFF/Windows. Patch by Adrien Guinet. llvm-svn: 273880
* Revert 273848, it caused PR28329Nico Weber2016-06-273-12/+12
| | | | llvm-svn: 273879
* Last line of file missing on previous check-in.Chris Dewhurst2016-06-271-0/+1
| | | | llvm-svn: 273878
* Move isPositionIndependent up to AsmPrinter.Rafael Espindola2016-06-275-8/+9
| | | | | | Use it in ppc too. llvm-svn: 273877
* [Sparc] Formatting and commenting changes per review.Chris Dewhurst2016-06-272-185/+191
| | | | | | Differential Review: http://reviews.llvm.org/rL273108 llvm-svn: 273876
* Use the isPositionIndependent predicate. NFC.Rafael Espindola2016-06-271-4/+2
| | | | llvm-svn: 273875
* Removed duplicate assertions noteSimon Pilgrim2016-06-271-1/+0
| | | | llvm-svn: 273874
* [ARM] Use member initializers in ARMSubtarget. NFCIDiana Picus2016-06-272-103/+78
| | | | | | | | Same as r273556, but with C++11 member initializers. Change suggested by Matthias Braun (see http://reviews.llvm.org/D21432). llvm-svn: 273873
* Fix "not all control paths return a value" warning on MSVCSimon Pilgrim2016-06-271-0/+2
| | | | llvm-svn: 273872
* Simplify getLabelAccessInfo.Rafael Espindola2016-06-271-24/+19
| | | | | | It now takes a IsPIC flag instead of computing and returning it. llvm-svn: 273871
* Use the isPositionIndependent predicate. NFC.Rafael Espindola2016-06-271-6/+6
| | | | llvm-svn: 273870
* Improve watchpoint error reporting specially for arm/aarch64 targetsOmair Javaid2016-06-273-13/+13
| | | | | | Differential revision: http://reviews.llvm.org/D21164 llvm-svn: 273869
OpenPOWER on IntegriCloud