summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Revert "Implement tls scanning for darwin LSan"Francis Ricci2017-05-175-134/+22
| | | | | | This reverts r303262, due to TSan buildbot breakages. llvm-svn: 303266
* [Frontend] Remove unused TemporaryFilesKrasimir Georgiev2017-05-172-29/+0
| | | | | | | | | | | | | | | | Summary: OnDiskData.TemporaryFiles is filled only by ASTUnit::addTemporaryFile, which is dead. Also these files are used nowhere in the frontend nor in libclang. Reviewers: bkramer, ilya-biryukov Reviewed By: bkramer, ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33270 llvm-svn: 303265
* Change getChecksFilter() interface to hide implementation details.Alexander Kornienko2017-05-174-23/+21
| | | | llvm-svn: 303264
* [clang-tidy] Replace matchesName with hasName where no regex is neededAlexander Kornienko2017-05-172-9/+9
| | | | llvm-svn: 303263
* Implement tls scanning for darwin LSanFrancis Ricci2017-05-175-22/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This required for any users who call exit() after creating thread-specific data, as tls destructors are only called when pthread_exit() or pthread_cancel() are used. This should also match tls behavior on linux. Getting the base address of the tls section is straightforward, as it's stored as a section offset in %gs. The size is a bit trickier to work out, as there doesn't appear to be any official documentation or source code referring to it. The size used in this patch was determined by taking the difference between the base address and the address of the subsequent memory region returned by vm_region_recurse_64, which was 1024 * sizeof(uptr) on all threads except the main thread, where it was larger. Since the section must be the same size on all of the threads, 1024 * sizeof(uptr) seemed to be a reasonable size to use, barring a more programtic way to get the size. 1024 seems like a reasonable number, given that PTHREAD_KEYS_MAX is 512 on darwin, so pthread keys will fit inside the region while leaving space for other tls data. A larger size would overflow the memory region returned by vm_region_recurse_64, and a smaller size wouldn't leave room for all the pthread keys. In addition, the stress test added here passes, which means that we are scanning at least the full set of possible pthread keys, and probably the full tls section. Reviewers: alekseyshl, kubamracek Subscribers: krytarowski, llvm-commits Differential Revision: https://reviews.llvm.org/D33215 llvm-svn: 303262
* [InstCombine] add isCanonicalPredicate() helper function and use it; NFCISanjay Patel2017-05-173-44/+461
| | | | | | | | | | | | | | | | | | | | There should be a slight efficiency improvement from handling icmp/fcmp with one matcher and reducing duplicated code. The larger motivation is that there are questions about how predicate canonicalization is handled, and the refactoring should make it easier if we want to change any of that behavior. 1. As noted in the code comment, we've chosen 3 of the 16 FCMP preds as not canonical. Why those 3? It goes back to rL32751 from what I can tell, but I'm not sure if there's a justification for that rule. 2. We currently do not canonicalize integer select conditions. Should we use the same rule that applies to branches for selects? 3. We currently do canonicalize some FP select conditions, and those rules would conflict with the rule shown here. Should one or both be changed? No-functional-change-intended, but adding tests anyway because there's no coverage for most of the predicates. Differential Revision: https://reviews.llvm.org/D33247 llvm-svn: 303261
* Recommit "[include-fixer] Don't throw exception when parsing unknown ar… ↵Haojian Wu2017-05-171-1/+6
| | | | | | | | | | | | | | | | …guments in vim script." Summary: To make it work in neovim. Reviewers: bkramer Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33273 llvm-svn: 303260
* [globalisel][tablegen] Import rules containing intrinsic_wo_chain.Daniel Sanders2017-05-173-3/+58
| | | | | | | | | | | | | | | | | Summary: As of this patch, 1018 out of 3938 rules are currently imported. Depends on D32275 Reviewers: qcolombet, kristof.beyls, rovka, t.p.northover, ab, aditya_nandakumar Reviewed By: qcolombet Subscribers: dberris, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D32278 llvm-svn: 303259
* [x86] Update tests in psubus.ll; NFCSanjay Patel2017-05-171-661/+602
| | | | | | | | | | Remove unnecessary memops to minimize tests. Patch by Yulia Koval! Differential Revision: https://reviews.llvm.org/D32643 llvm-svn: 303258
* [PPC] Properly update register save area offsetsKrzysztof Parzyszek2017-05-174-9/+171
| | | | | | | | | | | | The variables MinGPR/MinG8R were not updated properly when resetting the offsets, which in the included testcase lead to saving the CR register in the same location as R30. This fixes another issue reported in PR26519. Differential Revision: https://reviews.llvm.org/D33017 llvm-svn: 303257
* [clang-tidy] A bit of refactoring of modernize-replace-auto-ptr. NFCAlexander Kornienko2017-05-171-141/+69
| | | | llvm-svn: 303256
* [GlobalISel][X86] Support add i64 in IA32.Igor Breger2017-05-176-43/+290
| | | | | | | | | | | | | | Summary: support G_UADDE instruction selection. Reviewers: zvi, guyblank Reviewed By: guyblank Subscribers: rovka, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D33096 llvm-svn: 303255
* [SystemZ] Modelling of costs of divisions with a constant power of 2.Jonas Paulsson2017-05-172-1/+187
| | | | | | | | Such divisions will eventually be implemented with shifts which should be reflected in the cost function. Review: Ulrich Weigand llvm-svn: 303254
* [globalisel][tablegen] Require that all registers between instructions of a ↵Daniel Sanders2017-05-172-0/+6
| | | | | | | | | | | | | | | | | | | match are virtual. Summary: Without this, it's possible to encounter multiple defs for a register. This is triggered by the current version of D32868 when applied to trunk. Reviewers: qcolombet, ab, t.p.northover, rovka, kristof.beyls Reviewed By: qcolombet Subscribers: llvm-commits, igorb Differential Revision: https://reviews.llvm.org/D32869 llvm-svn: 303253
* Reland r303247: [ARM] GlobalISel: Remove dead instruction selection codeDiana Picus2017-05-171-15/+0
| | | | | | | | It only failed on llvm-clang-x86_64-expensive-checks-win, probably because the TableGen stuff hasn't been regenerated. Requires a clean build. llvm-svn: 303252
* [DWARF] - Cleanup relocations proccessing.George Rimar2017-05-172-40/+22
| | | | | | | | | | | | | | | RelocAddrMap was a pair of <width, address>, where width is relocation size (4/8/x, x < 8), and width field was never used in code. Relocations proccessing loop had checks for width field. Does not look like DWARF parser should do that. There is probably no much sense to validate relocations during proccessing them in parser. Patch removes relocation's width relative code from DWARFContext. Differential revision: https://reviews.llvm.org/D33194 llvm-svn: 303251
* Constify.Vassil Vassilev2017-05-171-1/+1
| | | | llvm-svn: 303250
* Revert "[ARM] GlobalISel: Remove dead instruction selection code"Diana Picus2017-05-171-0/+15
| | | | | | | This reverts commit r303247 because the tests are failing on some bots. Sorry! llvm-svn: 303249
* Make TestConflictingSymbol run on non-darwin targetsPavel Labath2017-05-172-8/+12
| | | | | | | | | | | For remote targets we need to call registerSharedLibrariesWithTarget to make sure they are installed alongside main executable. This also required a small fixup in the the mentioned function as in this case "One" was both a directory name and a library name template. I fixed it to make sure it checks that the string refers to a file before it assumed it was a full library path. llvm-svn: 303248
* [ARM] GlobalISel: Remove dead instruction selection codeDiana Picus2017-05-171-15/+0
| | | | | | | We can now generate code for selecting G_ADD, G_SUB and G_MUL. Remove the hand-written versions. llvm-svn: 303247
* [Lexer] Ensure that the token is not an annotation token whenAlex Lorenz2017-05-174-0/+18
| | | | | | | | | | | retrieving the identifer info for an Objective-C keyword This commit fixes an assertion that's triggered in getIdentifier when the token is an annotation token. rdar://32225463 llvm-svn: 303246
* [Sparc] Remove execute permissions from non-executable text filesDaniel Cederman2017-05-1710-0/+0
| | | | | | | | | | | | Reviewers: jyknight, lero_chris, venkatra Reviewed By: jyknight Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27127 llvm-svn: 303245
* Fixup r303240: Use llvm::to_string instead of std::to_stringDiana Picus2017-05-171-3/+3
| | | | | | | It turns out some of the buildbots don't have std::to_string around, even in this day and age... llvm-svn: 303243
* Revert "[include-fixer] Don't throw exception when parsing unknown arguments ↵Benjamin Kramer2017-05-171-1/+1
| | | | | | | | | in vim script." This reverts commit r302934. It's wrong, edits the wrong file and was committed without review. llvm-svn: 303242
* [DebugInfo/DWARF] - Make comments to be in doxygen style. NFCi.George Rimar2017-05-179-78/+78
| | | | | | | This changes "//" to "///" in llvm/DebugInfo/DWARF folder where appropriate and also removes few trailing whitespaces. llvm-svn: 303241
* [GlobalISel][TableGen] Fix handling of default operandsDiana Picus2017-05-172-48/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | When looping through a destination pattern's operands to decide how many default operands we need to introduce, we used to count the "expanded" number of operands. So if one default operand would be rendered as 2 values, we'd count it as 2 operands, when in fact it needs to count as only 1 operand regardless of how many values it expands to. This turns out to be a problem only in some very specific cases, e.g. when we have one operand with multiple default values followed by more operands with default values (see the new test). In such a situation we'd stop looping before looking at all the operands, and then error out assuming that we don't have enough default operands to make up the shortfall. At the moment this only affects ARM. The patch removes the loop counting default operands entirely and assumes that we'll have to introduce values for any default operand that we find (i.e. we're assuming it cannot be given as a child at all). It also extracts the code for adding renderers for default operands into a helper method. Differential Revision: https://reviews.llvm.org/D33031 llvm-svn: 303240
OpenPOWER on IntegriCloud