summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* CodeGen: BlockPlacement: Add Message strings to asserts. NFCKyle Butt2017-05-171-16/+29
| | | | | | | | Add message strings to all the unlabeled asserts in the file. Differential Revision: https://reviews.llvm.org/D33078 llvm-svn: 303316
* [InstCombine] add test for xor-of-icmps; NFCSanjay Patel2017-05-171-2/+15
| | | | | | This is another form of the problem discussed in D32143. llvm-svn: 303315
* [Statistics] Use Statistic::operator+= instead of adding and assigning ↵Craig Topper2017-05-172-2/+2
| | | | | | | | separately. I believe this technically fixes a multithreaded race condition in this code. But my primary concern was as part of looking at removing the ability to treat Statistics like a plain unsigned. There are many weird operations on Statistics in the codebase. llvm-svn: 303314
* Revert "[globalisel][tablegen] Import rules containing intrinsic_wo_chain."Quentin Colombet2017-05-173-58/+3
| | | | | | | | | This reverts commit r303259. This breaks the GISel bot: http://lab.llvm.org:8080/green/job/Compiler_Verifiers_GlobalISEL/5163/consoleFull#-134276167849ba4694-19c4-4d7e-bec5-911270d8a58c llvm-svn: 303313
* [InstCombine] handle icmp i1 X, C early to avoid creating an unknown patternSanjay Patel2017-05-172-4/+25
| | | | | | | | | | | The missing optimization for xor-of-icmps still needs to be added, but by being more efficient (not generating unnecessary logic ops with constants) we avoid the bug. See discussion in post-commit comments: https://reviews.llvm.org/D32143 llvm-svn: 303312
* Attempt to pacify ASan and UBSan reports in CrashRecovery testsReid Kleckner2017-05-171-1/+5
| | | | llvm-svn: 303311
* [InstCombine] add test for missing icmp bool fold; NFCSanjay Patel2017-05-171-10/+26
| | | | llvm-svn: 303310
* [InstCombine] move icmp bool canonicalizations to helper; NFCSanjay Patel2017-05-171-43/+54
| | | | | | | | As noted in the post-commit comments in D32143, we should be catching the constant operand cases sooner to be more efficient and less likely to expose a missing fold. llvm-svn: 303309
* AMDGPU: Start defining a calling conventionMatt Arsenault2017-05-1729-126/+1851
| | | | | | | | Partially implement callee-side for arguments and return values. byval doesn't work properly, and most likely sret or other on-stack return values most as well. llvm-svn: 303308
* CodeGen: Power: Add lowering for shifts of v1i128.Kyle Butt2017-05-173-4/+111
| | | | | | | | | | | | When legalizing vector operations on vNi128, they will be split to v1i128 because that is a legal type on ppc64, but then the compiler will crash in selection dag because it fails to select for these operations. This patch fixes shift operations. Logical shift right and left shift can be performed in the vector unit, but algebraic shift right requires being split. Differential Revision: https://reviews.llvm.org/D32774 llvm-svn: 303307
* Fix PR33028Michael Liao2017-05-173-17/+45
| | | | | | | | | | | | - '-verify-mahcineinstrs' starts to complain allocatable live-in physical registers on non-entry or non-landing-pad basic blocks. - Refactor the XBEGIN translation to define EAX on a dedicated fallback code path due to XABORT. Add a pseudo instruction to define EAX explicitly to avoid add physical register live-in. Differential Revision: https://reviews.llvm.org/D33168 llvm-svn: 303306
* AMDGPU: Remove old intrinsic usesMatt Arsenault2017-05-175-15/+13
| | | | llvm-svn: 303305
* Re-submit r303225: Garbage collect dllimported symbols.Rui Ueyama2017-05-177-27/+147
| | | | | | | | | | This reverts re-submits r303225 which was reverted in r303270 because it broke the sanitizer-windows bot. The reason of the failure is that we were writing dead symbols to the symbol table. I fixed the issue. llvm-svn: 303304
* AMDGPU: Expand frame indexes to be relative to scratch wave offsetMatt Arsenault2017-05-171-6/+71
| | | | | | | | | | | | In order for an arbitrary callee to access an object in a caller's stack frame, the 32-bit offset used as the private pointer needs to be relative to the kernel's scratch wave offset register. Convert to this by finding the difference from the current stack frame and scaling by the wavefront size. llvm-svn: 303303
* [XRay] Fix __xray_function_address on PPC reguarding local entry points.Tim Shen2017-05-172-13/+12
| | | | | | | | | | Reviewers: echristo, dberris Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D33266 llvm-svn: 303302
* AMDGPU: Change mubuf soffset register when SP relativeMatt Arsenault2017-05-172-15/+53
| | | | | | | | | | Check the MachinePointerInfo for whether the access is supposed to be relative to the stack pointer. No tests because this is used in later commits implementing calls. llvm-svn: 303301
* [X86][AVX512] Add 512-bit vector ctlz costs + testsSimon Pilgrim2017-05-172-6/+174
| | | | llvm-svn: 303300
* [llvm-pdbdump] in yaml2pdb, generate default output filename if none givenBob Haarman2017-05-172-4/+11
| | | | | | | | | | | | | | | | | | | | Summary: llvm-pdbdump yaml2pdb used to fail with a misleading error message ("An I/O error occurred on the file system") if no output file was specified. This change adds an assert to PDBFileBuilder to check that an output file name is specified, and makes llvm-pdbdump generate an output file name based on the input file name if no output file name is explicitly specified. Reviewers: amccarth, zturner Reviewed By: zturner Subscribers: fhahn, llvm-commits Differential Revision: https://reviews.llvm.org/D33296 llvm-svn: 303299
* update the test that should have been updated in r303292. (NFC)Dehao Chen2017-05-171-1/+1
| | | | llvm-svn: 303298
* Add some helpers for manipulating BinaryStreamRefs.Zachary Turner2017-05-174-3/+62
| | | | llvm-svn: 303297
* AMDGPU: Make better use of op_sel with high componentsMatt Arsenault2017-05-173-10/+486
| | | | | | Handle more general swizzles. llvm-svn: 303296
* [InstSimplify] handle all icmp i1 X, C in one place; NFCISanjay Patel2017-05-172-28/+210
| | | | | | | | | | | | | | We already handled all of the new tests identically, but several of those went through a lot of unnecessary processing before getting folded. Another motivation for grouping these cases together is that InstCombine needs a similar fold. Currently, it handles the 'not' cases inefficiently which can lead to bugs as described in the post-commit comments of: https://reviews.llvm.org/D32143 llvm-svn: 303295
* [BinaryStream] Reduce the amount of boiler plate needed to use.Zachary Turner2017-05-178-88/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Often you have an array and you just want to use it. With the current design, you have to first construct a `BinaryByteStream`, and then create a `BinaryStreamRef` from it. Worse, the `BinaryStreamRef` holds a pointer to the `BinaryByteStream`, so you can't just create a temporary one to appease the compiler, you have to actually hold onto both the `ArrayRef` as well as the `BinaryByteStream` *AND* the `BinaryStreamReader` on top of that. This makes for very cumbersome code, often requiring one to store a `BinaryByteStream` in a class just to circumvent this. At the cost of some added complexity (not exposed to users, but internal to the library), we can do better than this. This patch allows us to construct `BinaryStreamReaders` and `BinaryStreamWriters` directly from source data (e.g. `StringRef`, `MutableArrayRef<uint8_t>`, etc). Not only does this reduce the amount of code you have to type and make it more obvious how to use it, but it solves real lifetime issues when it's inconvenient to hold onto a `BinaryByteStream` for a long time. The additional complexity is in the form of an added layer of indirection. Whereas before we simply stored a `BinaryStream*` in the ref, we now store both a `BinaryStream*` **and** a `std::shared_ptr<BinaryStream>`. When the user wants to construct a `BinaryStreamRef` directly from an `ArrayRef` etc, we allocate an internal object that holds ownership over a `BinaryByteStream` and forwards all calls, and store this in the `shared_ptr<>`. This also maintains the ref semantics, as you can copy it by value and references refer to the same underlying stream -- the one being held in the object stored in the `shared_ptr`. Differential Revision: https://reviews.llvm.org/D33293 llvm-svn: 303294
* [X86][AVX512] Add 512-bit vector cttz costs + testsSimon Pilgrim2017-05-172-6/+131
| | | | llvm-svn: 303293
* Only enable LiveRangeShrink for x86.Dehao Chen2017-05-176-9/+7
| | | | | | | | | | | | | | Summary: Moving LiveRangeShrink to x86 as this pass is mostly useful for archtectures with great register pressure. Reviewers: MatzeB, qcolombet Reviewed By: qcolombet Subscribers: jholewinski, jyknight, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D33294 llvm-svn: 303292
* AMDGPU: Try to use op_sel when selecting packed instructionsMatt Arsenault2017-05-173-4/+298
| | | | | | | | | | | | Avoids instructions to pack a vector when the source is really a scalar being broadcast. Also be smarter and look for per-component fneg. Doesn't yet handle scalar from upper half of register or other swizzles. llvm-svn: 303291
* [X86] Split ctpop/ctlz/cttz cost testsSimon Pilgrim2017-05-174-587/+599
| | | | | | This will make things a lot easier to test all the permutations of avx512 llvm-svn: 303290
* Reapply part of rL303015, fixing just the DynamicLibaryTest. AddDimitry Andric2017-05-171-1/+3
| | | | | | | retrieval of the original argv[0] from the GoogleTest framework, so it is more likely the correct main executable path is found. llvm-svn: 303289
* [WebAssembly][NFC] Update expected testsuite failures for newly passing testsJacob Gravelle2017-05-171-3/+0
| | | | | | | | | | | | Summary: r303050 fixes crashes when calling scalarizeMaskedMemIntrin pass from WebAssembly backend. This updates expected test failures for that. Reviewers: sbc100 Subscribers: jfb, llvm-commits, dschuff Differential Revision: https://reviews.llvm.org/D33295 llvm-svn: 303288
* AMDGPU: Use appropriate soffset for spillingMatt Arsenault2017-05-172-20/+20
| | | | | | | This needs to be the frame offset register, and not the global scratch wave offset register. For kernels, these are the same. llvm-svn: 303287
* [Ubsan]Remove unused link libraries.Leo Li2017-05-171-5/+1
| | | | | | | | | | | | | | Summary: Remove unused link libraries metioned in D33216. Reviewers: llvm-commits, vsk Reviewed By: vsk Subscribers: vsk, kubamracek, mgorny, filcab Differential Revision: https://reviews.llvm.org/D33292 llvm-svn: 303286
* Revert r303015, because it has the unintended side effect of breakingDimitry Andric2017-05-172-27/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | driver-mode recognition in clang (this is because the sysctl method always returns one and only one executable path, even for an executable with multiple links): Fix DynamicLibraryTest.cpp on FreeBSD and NetBSD Summary: After rL301562, on FreeBSD the DynamicLibrary unittests fail, because the test uses getMainExecutable("DynamicLibraryTests", Ptr), and since the path does not contain any slashes, retrieving the main executable will not work. Reimplement getMainExecutable() for FreeBSD and NetBSD using sysctl(3), which is more reliable than fiddling with relative or absolute paths. Also add retrieval of the original argv[] from the GoogleTest framework, to use as a fallback for other OSes. Reviewers: emaste, marsupial, hans, krytarowski Reviewed By: krytarowski Subscribers: krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D33171 llvm-svn: 303285
* AMDGPU: Fix min3/max3 combines for f16/i16Matt Arsenault2017-05-178-112/+368
| | | | | | Fix missing instruction definitions for min3/max3. llvm-svn: 303284
* [X86][AVX512] Add 512-bit vector bitreverse costs + testsSimon Pilgrim2017-05-172-0/+87
| | | | llvm-svn: 303283
* Add back a dummy --use-processes.Rafael Espindola2017-05-171-0/+3
| | | | | | Some bots are using it. llvm-svn: 303282
* Make next/prev/advance/distance operations on iterators be constexpr. I ↵Marshall Clow2017-05-176-81/+203
| | | | | | missed this when I implemented the rest of P0031R0 llvm-svn: 303281
* Always use the multiprocess module.Rafael Espindola2017-05-172-115/+3
| | | | | | This seems to work on freebsd and openbsd these days. llvm-svn: 303280
* Re-land r303274: "[CrashRecovery] Use SEH __try instead of VEH when available"Reid Kleckner2017-05-173-48/+155
| | | | | | | | | | | We have to check gCrashRecoveryEnabled before using __try. In other words, SEH works too well and we ended up recovering from crashes in implicit module builds that we weren't supposed to. Only libclang is supposed to enable CrashRecoveryContext to allow implicit module builds to crash. llvm-svn: 303279
* Fix error string set in AddName to take a StringRef.Ted Woodward2017-05-171-2/+2
| | | | llvm-svn: 303278
* [GISel]: Fix undefined behavior in IRTranslatorAditya Nandakumar2017-05-171-0/+5
| | | | | | | | Make sure IRTranslator->MachineIRBuilder->DebugLoc doesn't outlive the DILocation. Clear it at the end of IRTranslator::runOnMachineFunction llvm-svn: 303277
* Generate ubsan shared libraries.Leo Li2017-05-171-0/+29
| | | | | | | | | | | | | | Summary: Those libraries are required by aosp (https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/Android.mk). Currenly the shared libraries are generated by aosp Makefile system. We are looking forward to using cmake to generate them. Reviewers: llvm-commits, vsk Reviewed By: vsk Subscribers: filcab, vsk, srhines, kubamracek, mgorny, krytarowski Differential Revision: https://reviews.llvm.org/D33216 llvm-svn: 303276
* Revert "[CrashRecovery] Use SEH __try instead of VEH when available"Reid Kleckner2017-05-173-150/+48
| | | | | | This reverts commit r303274, it appears to break some clang tests. llvm-svn: 303275
* [CrashRecovery] Use SEH __try instead of VEH when availableReid Kleckner2017-05-173-48/+150
| | | | | | | | | | | | | | | | | | | | Summary: It avoids problems when other libraries raise exceptions. In particular, OutputDebugString raises an exception that the debugger is supposed to catch and suppress. VEH kicks in first right now, and that is entirely incorrect. Unfortunately, GCC does not support SEH, so I've kept the old buggy VEH codepath around. We could fix it with SetUnhandledExceptionFilter, but that is not per-thread, so a well-behaved library shouldn't set it. Reviewers: zturner Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D33261 llvm-svn: 303274
* Include setjmp.h unconditionally in asan_test_utils.hHans Wennborg2017-05-171-1/+1
| | | | | | | | | | | | | | | | | It's used in asan_test.cc also on Windows, and my build was failing with: C:/src/llvm/projects/compiler-rt/lib/asan/tests/asan_test.cc:549:28: error: unknown type name 'jmp_buf' NOINLINE void LongJmpFunc1(jmp_buf buf) { ^ C:/src/llvm/projects/compiler-rt/lib/asan/tests/asan_test.cc:569:10: error: unknown type name 'jmp_buf' static jmp_buf buf; ^ I couldn't find what changed to make this not work anymore, but this should fix it. llvm-svn: 303273
* Workaround for incorrect Win32 header on GCC.Zachary Turner2017-05-171-6/+4
| | | | llvm-svn: 303272
* [CodeView] Simplify the use of visiting type records & streams.Zachary Turner2017-05-1716-168/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is often a lot of boilerplate code required to visit a type record or type stream. The #1 use case is that you have a sequence of bytes that represent one or more records, and you want to deserialize each one, switch on it, and call a callback with the deserialized record that the user can examine. Currently this requires at least 6 lines of code: codeview::TypeVisitorCallbackPipeline Pipeline; Pipeline.addCallbackToPipeline(Deserializer); Pipeline.addCallbackToPipeline(MyCallbacks); codeview::CVTypeVisitor Visitor(Pipeline); consumeError(Visitor.visitTypeRecord(Record)); With this patch, it becomes one line of code: consumeError(codeview::visitTypeRecord(Record, MyCallbacks)); This is done by having the deserialization happen internally inside of the visitTypeRecord function. Since this is occasionally not desirable, the function provides a 3rd parameter that can be used to change this behavior. Hopefully this can significantly reduce the barrier to entry to using the visitation infrastructure. Differential Revision: https://reviews.llvm.org/D33245 llvm-svn: 303271
* Revert r303225 "Garbage collect dllimported symbols."Hans Wennborg2017-05-177-129/+19
| | | | | | | | | | | | | | | | | | | | | | | | | and follow-up r303226 "Fix Windows buildbots." This broke the sanitizer-windows buildbot. > Previously, the garbage collector (enabled by default or by explicitly > passing /opt:ref) did not kill dllimported symbols. As a result, > dllimported symbols could be added to resulting executables' dllimport > list even if no one was actually using them. > > This patch implements dllexported symbol garbage collection. Just like > COMDAT sections, dllimported symbols now have Live bits to manage their > liveness, and MarkLive marks reachable dllimported symbols. > > Fixes https://bugs.llvm.org/show_bug.cgi?id=32950 > > Reviewers: pcc > > Subscribers: llvm-commits > > Differential Revision: https://reviews.llvm.org/D33264 llvm-svn: 303270
* [BitVector] Add find_[first,last]_[set,unset]_in.Zachary Turner2017-05-172-99/+272
| | | | | | | | | | | | | A lot of code is duplicated between the first_last and the next / prev methods. All of this code can be shared if they are implemented in terms of find_first_in(Begin, End) etc, in which case find_first = find_first_in(0, Size) and find_next is find_first_in(Prev+1, Size), with similar reductions for the other methods. Differential Revision: https://reviews.llvm.org/D33104 llvm-svn: 303269
* Mark the copy constructor and move Marshall Clow2017-05-173-4/+14
| | | | | | constructor to be constexpr. This only works when the contained type has a constexpr copy/move ctor. llvm-svn: 303268
* clang-cl: Fix path-based MSVC version detectionHans Wennborg2017-05-171-2/+9
| | | | | | | | | The code wasn't taking the architecture-specific subdirectory into account. Differential Revision: https://reviews.llvm.org/D33258 llvm-svn: 303267
OpenPOWER on IntegriCloud