summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [sanitizer] Passthrough CMAKE_OSX_DEPLOYMENT_TARGET when building ↵Kuba Brecka2016-11-141-0/+1
| | | | | | | | | | compiler-rt from clang/runtime/CMakeLists.txt This breaks some Swift builds, because Swift's build scripts explicitly set CMAKE_OSX_DEPLOYMENT_TARGET. This however isn't propagated to the compiler-rt build, causing build errors. Differential Revision: https://reviews.llvm.org/D26558 llvm-svn: 286898
* Remove redundant uses of \brief.Adrian Prantl2016-11-141-42/+42
| | | | llvm-svn: 286897
* Don't pass nullptr into memcpyVitaly Buka2016-11-141-0/+3
| | | | | | | | | | | | | | | Summary: It's undefined according UBSAN. Not sure which CL caused test failures, but seems writeBytes for empty buffer should be OK. Reviewers: rnk, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26638 llvm-svn: 286896
* RegAllocGreedy: Properly initialize this pass, so that -run-pass will workTom Stellard2016-11-145-13/+34
| | | | | | | | | | Reviewers: qcolombet, MatzeB Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D26572 llvm-svn: 286895
* [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit ↵Kuba Brecka2016-11-143-0/+194
| | | | | | | | | | during unwinding), compiler-rt part This adds support for TSan C++ exception handling, where we need to add extra calls to __tsan_func_exit when a function is exitted via exception mechanisms. Otherwise the shadow stack gets corrupted (leaked). This patch moves and enhances the existing implementation of EscapeEnumerator that finds all possible function exit points, and adds extra EH cleanup blocks where needed. Differential Revision: https://reviews.llvm.org/D26177 llvm-svn: 286894
* [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit ↵Kuba Brecka2016-11-1414-187/+322
| | | | | | | | | | during unwinding), LLVM part This adds support for TSan C++ exception handling, where we need to add extra calls to __tsan_func_exit when a function is exitted via exception mechanisms. Otherwise the shadow stack gets corrupted (leaked). This patch moves and enhances the existing implementation of EscapeEnumerator that finds all possible function exit points, and adds extra EH cleanup blocks where needed. Differential Revision: https://reviews.llvm.org/D26177 llvm-svn: 286893
* Update stats-gathering codeJonathan Peyton2016-11-146-117/+102
| | | | | | | | | | | | | Have developer timers use partitioning scheme which also required that some redundant developer timers be removed in favor of the already existing normal timers. Move per thread stats initialization to just after global thread id assignment which is as early as possible. Also put all global stats initialization code in __kmp_stats_init() and all global stats destruction code in __kmp_stats_fini(). Differential Revision: https://reviews.llvm.org/D26361 llvm-svn: 286892
* Revert "Revert "llvm-strings: support printing the filename""Saleem Abdulrasool2016-11-146-7/+35
| | | | | | | Change the dynamic files to static in the hope that it will actually fix the transient errors that Ive been unable to reproduce. llvm-svn: 286891
* Introduce dynamic affinity dispatch capabilitiesJonathan Peyton2016-11-1413-721/+633
| | | | | | | | | | | | | | | | | | | | | | | | | This set of changes enables the affinity interface (Either the preexisting native operating system or HWLOC) to be dynamically set at runtime initialization. The point of this change is that we were seeing performance degradations when using HWLOC. This allows the user to use the old affinity mechanisms which on large machines (>64 cores) makes a large difference in initialization time. These changes mostly move affinity code under a small class hierarchy: KMPAffinity class Mask {} KMPNativeAffinity : public KMPAffinity class Mask : public KMPAffinity::Mask KMPHwlocAffinity class Mask : public KMPAffinity::Mask Since all interface functions (for both affinity and the mask implementation) are virtual, the implementation can be chosen at runtime initialization. Differential Revision: https://reviews.llvm.org/D26356 llvm-svn: 286890
* Add a checkSymbolTable() method to the MachOObjectFile class.Kevin Enderby2016-11-148-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The philosophy of the error checking in libObject for Mach-O files is that the constructor will check the load commands so for their tables the offsets and sizes are properly contained in the file. But there is no checking of the entries of any of the tables. For the contents of the tables themselves the methods accessing the contents of the entries return errors as needed. In some cases this however makes it difficult or cumbersome to produce a good error message which would include the tool name, file name, archive member, and name of the architecture of a slice of a universal file the error occurred in. So idea is that there will be a method to check a table which can be called up front before using it allowing a good error message to be produced before a table is used. And if only verification of the Mach-O file and its tables are wanted a new possible method checkAllTables() could be added to call all of the methods to check all the tables at some time when such methods exist. The checkSymbolTable() is the first of such methods to check one of the Mach-O file tables. This method initially will used in llvm-objdump’s DisassembleMachO() routine before it gets the section and symbol information. As if there are problems with the symbol table currently the error is first encountered by the bool operator() in the SymbolSorter() struct which passed to std::sort(). In this case there is no context as to the file name the symbol which results a poor error message: LLVM ERROR: truncated or malformed object (bad string index: 22 for symbol at index 1) with the added call to the checkSymbolTable() method the error message includes the tool name and file name: llvm-objdump: 'macho-invalid-symbol-strx': truncated or malformed object (bad string table index: 22 past the end of string table, for symbol at index 1) llvm-svn: 286887
* [Hexagon] Give a predicate function a more meaningful nameKrzysztof Parzyszek2016-11-142-18/+18
| | | | | | | Change "orisadd" to "IsOrAdd" to follow the naming conventions, and change "isOrAdd" in the C++ code to "isOrEquivalentToAdd". llvm-svn: 286886
* Temporarily relax test expectations to fix failures on ppc64.Evgeniy Stepanov2016-11-141-2/+0
| | | | | | | | | | | | | | Summary: Relax test expectations to fix failures on ppc64. Reviewers: eugenis Subscribers: kubabrecka, llvm-commits Patch by Aleksey Shlyapnikov. Differential Revision: https://reviews.llvm.org/D26629 llvm-svn: 286885
* P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t and ↵Marshall Clow2016-11-144-6/+46
| | | | | | istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0521, which required no changes to the library or tests. llvm-svn: 286884
* Missed a test with exceptions disabled earlier. Oops.Marshall Clow2016-11-141-4/+14
| | | | llvm-svn: 286883
* ARM: try to fix GCC 4.8 compilation again after r286881.Tim Northover2016-11-141-1/+2
| | | | llvm-svn: 286882
* Recommit: ARM: sort register lists by encoding in push/pop instructions.Tim Northover2016-11-144-6/+32
| | | | | | | | | | | | | | | | | For example we were producing push {r8, r10, r11, r4, r5, r7, lr} This is misleading (r4, r5 and r7 are actually pushed before the rest), and other components (stack folding recently) often forget to deal with the extra complexity coming from the different order, leading to miscompiles. Finally, we warn about our own code in -no-integrated-as mode without this, which is really not a good idea. Fixed usage of std::sort so that we (hopefully) use instantiations that actually exist in GCC 4.8. llvm-svn: 286881
* Fix heap-use-after-free coff::createPDBVitaly Buka2016-11-141-2/+1
| | | | | | | | | | | | | | Summary: getInputSections returns std::vector by value and ArrayRef pointed to destroyed temporarily. Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26630 llvm-svn: 286880
* [AArch64] Change some pointers to references. NFC.Geoff Berry2016-11-141-16/+16
| | | | | | Follow-up change to r286875. llvm-svn: 286879
* [X86] Tests exhibiting bad parial reloading behavior. NFC.Michael Kuperstein2016-11-142-0/+69
| | | | llvm-svn: 286878
* Implement P0516: 'Clarify That shared_future’s Copy Operations have Wide ↵Marshall Clow2016-11-144-4/+16
| | | | | | Contracts' which was adopted last week in Issaquah llvm-svn: 286877
* Attempt to fix freaky bot.Rui Ueyama2016-11-141-1/+1
| | | | | | | I don't really understand what is failing on lld-x86_64-darwin13 bot, but this patch should at least reduces the number of moving parts. llvm-svn: 286876
* [AArch64] Split 0 vector stores into scalar store pairs.Geoff Berry2016-11-144-12/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Replace a splat of zeros to a vector store by scalar stores of WZR/XZR. The load store optimizer pass will merge them to store pair stores. This should be better than a movi to create the vector zero followed by a vector store if the zero constant is not re-used, since one instructions and one register live range will be removed. For example, the final generated code should be: stp xzr, xzr, [x0] instead of: movi v0.2d, #0 str q0, [x0] Reviewers: t.p.northover, mcrosier, MatzeB, jmolloy Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D26561 llvm-svn: 286875
* [AArch64] Factor out transform code from split16BStore. NFC.Geoff Berry2016-11-141-24/+31
| | | | llvm-svn: 286874
* [change-namespace] consider typedef/using alias decls in the moved namespace.Eric Liu2016-11-142-7/+90
| | | | | | | | | | | | Summary: If a TypeLoc refers to a type alias defined in the moved namespace, we do not need to update its specifier since the type alias decl will be moved along with the type reference. Reviewers: hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26592 llvm-svn: 286873
* Make one of the new tests fail correctly on pre-C++17 systemsMarshall Clow2016-11-141-0/+6
| | | | llvm-svn: 286872
* [ThinLTO] Only promote exported locals as marked in indexTeresa Johnson2016-11-145-28/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We have always speculatively promoted all renamable local values (except const non-address taken variables) for both the exporting and importing module. We would then internalize them back based on the ThinLink results if they weren't actually exported. This is inefficient, and results in unnecessary renames. It also meant we had to check the non-renamability of a value in the summary, which was already checked during function importing analysis in the ThinLink. Made renameModuleForThinLTO (which does the promotion/renaming) instead use the index when exporting, to avoid unnecessary renames/promotions. For importing modules, we can simply promoted all values as any local we import by definition is exported and needs promotion. This required changes to the method used by the FunctionImport pass (only invoked from 'opt' for testing) and when invoked from llvm-link, since neither does a ThinLink. We simply conservatively mark all locals in the index as promoted, which preserves the current aggressive promotion behavior. I also needed to change an llvm-lto based test where we had previously been aggressively promoting values that weren't importable (aliasees), but now will not promote. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D26467 llvm-svn: 286871
* [libFuzzer] replace 'auto' with 'auto *' to better follow the LLVM styleKostya Serebryany2016-11-141-3/+3
| | | | llvm-svn: 286870
* Revert: r286868 - Test commitDaniel Sanders2016-11-141-1/+0
| | | | llvm-svn: 286869
* Test commitDaniel Sanders2016-11-141-0/+1
| | | | llvm-svn: 286868
* Revert "ARM: sort register lists by encoding in push/pop instructions."Tim Northover2016-11-144-32/+6
| | | | | | | This reverts commit 286866. It broke a bot, something to do with exactly which templates std::sort accepts. llvm-svn: 286867
* ARM: sort register lists by encoding in push/pop instructions.Tim Northover2016-11-144-6/+32
| | | | | | | | | | | | | | For example we were producing push {r8, r10, r11, r4, r5, r7, lr} This is misleading (r4, r5 and r7 are actually pushed before the rest), and other components (stack folding recently) often forget to deal with the extra complexity coming from the different order, leading to miscompiles. Finally, we warn about our own code in -no-integrated-as mode without this, which is really not a good idea. llvm-svn: 286866
* Give SLP vectorizer credit where it's due.Michael Kuperstein2016-11-141-1/+1
| | | | llvm-svn: 286865
* Implement P0510 'Make future_error Constructible' adopted in IssaquahMarshall Clow2016-11-143-3/+19
| | | | llvm-svn: 286864
* [PPC] altivec.h functions for converting half precision to single precision.Sean Fertile2016-11-143-0/+40
| | | | | | | | | | Adds 2 vector functions for converting from a vector of unsigned short to a vector of float. One converts the low 4 halfwords and one converts the high 4 halfwords. Differential Revision: https://reviews.llvm.org/D26534 llvm-svn: 286863
* [PPC] Add intrinsic mapping to the xscvhpsp instructionSean Fertile2016-11-143-0/+23
| | | | | | | | | add an intrinsic to expose the 'VSX Scalar Convert Half-Precision to Single-Precision' instruction. Differential review: https://reviews.llvm.org/D26536 llvm-svn: 286862
* [opt-viewer] Don't fail with remarks without debug locationAdam Nemet2016-11-141-2/+2
| | | | llvm-svn: 286861
* AMDGPU/SI: Support data types other than V4f32 in image intrinsicsChangpeng Fang2016-11-145-64/+153
| | | | | | | | | | | | | | | | Summary: Extend image intrinsics to support data types of V1F32 and V2F32. TODO: we should define a mapping table to change the opcode for data type of V2F32 but just one channel is active, even though such case should be very rare. Reviewers: tstellarAMD Differential Revision: http://reviews.llvm.org/D26472 llvm-svn: 286860
* [sanitizer] Max out allowed macOS deployment targets to 10.9Kuba Brecka2016-11-141-1/+5
| | | | | | | | It's not a good idea to build the sanitizers with e.g. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12, because some deprecated functions that we intercept will cause build errors. Let's limit the allowed deployment targets to 10.9 (which is the default anyway), and warn when it's set above. Differential Revision: https://reviews.llvm.org/D26557 llvm-svn: 286859
* Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted ↵Marshall Clow2016-11-1425-16/+504
| | | | | | last week in Issaquah llvm-svn: 286858
* [ELF] Clarify why `lld -flavor gnu` is used.Davide Italiano2016-11-141-0/+2
| | | | | | Pointed out by Rafael! llvm-svn: 286857
* Fix OpenCL test for buildbot by removing extra (erroneous) RUN lineAnastasia Stulova2016-11-141-1/+0
| | | | llvm-svn: 286856
* [X86] Adding reproducer for pr30981Zvi Rackover2016-11-141-1/+11
| | | | llvm-svn: 286855
* Remove pwd to fix WinASan botReid Kleckner2016-11-141-1/+0
| | | | | | It only slipped in while I was debugging the test case. llvm-svn: 286854
* [PDB] Add documentation for the DBI Stream.Zachary Turner2016-11-142-3/+450
| | | | | | Differential Revision: https://reviews.llvm.org/D26552 llvm-svn: 286853
* [PDB] Add documentation for the PDB Stream.Zachary Turner2016-11-141-3/+80
| | | | | | https://reviews.llvm.org/D26516 llvm-svn: 286852
* Use _Unwind_Backtrace on Apple platforms.Bob Wilson2016-11-141-1/+1
| | | | | | | | | | | | | Darwin's backtrace() function does not work with sigaltstack (which was enabled when available with r270395) — it does a sanity check to make sure that the current frame pointer is within the expected stack area (which it is not when using an alternate stack) and gives up otherwise. The alternative of _Unwind_Backtrace seems to work fine on macOS, so use that when backtrace() fails. Note that we then use backtrace_symbols_fd() with the addresses from _Unwind_Backtrace, but I’ve tested that and it also seems to work fine. rdar://problem/28646552 llvm-svn: 286851
* Split strncmp and strncasecmp test and XFAIL one for WindowsReid Kleckner2016-11-142-27/+78
| | | | llvm-svn: 286850
* [OpenCL] Fix for integer parameters of enqueue_kernelAnastasia Stulova2016-11-145-109/+162
| | | | | | | | | | | | | | Make handling integer parameters more flexible: - For the number of events argument allow to pass larger integers than 32 bits as soon as compiler can prove that the range fits in 32 bits. If not, the diagnostic will be given. - Change type of the arguments specifying the sizes of the corresponding block arguments to be size_t. Review: https://reviews.llvm.org/D26509 llvm-svn: 286849
* [asan/win] Delay load dbghelp.dll to delay ucrtbase.dll initializationReid Kleckner2016-11-145-8/+100
| | | | | | | | | | | | | | | | | | | | | | | Summary: ASan needs to initialize before ucrtbase.dll so that it can intercept all of its heap allocations. New versions of dbghelp.dll depend on ucrtbase.dll, which means both of those DLLs will initialize before the dynamic ASan runtime. By lazily loading dbghelp.dll with LoadLibrary, we avoid the issue. Eventually, I would like to remove our dbghelp.dll dependency in favor of always using llvm-symbolizer.exe, but this seems like an acceptable interim solution. Fixes PR30903 Reviewers: etienneb Subscribers: kubabrecka, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D26473 llvm-svn: 286848
* [libcxx] [test] D26314: Fix MSVC warning C4189 "local variable is ↵Stephan T. Lavavej2016-11-1431-270/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialized but not referenced". test/std/depr/depr.c.headers/inttypes_h.pass.cpp test/std/input.output/file.streams/c.files/cinttypes.pass.cpp test/std/input.output/iostream.forward/iosfwd.pass.cpp Add test() to avoid a bunch of void-casts, although we still need a few. test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp skippingws was unused (it's unclear to me whether this was mistakenly copy-pasted from round_trip() below). test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp test/std/localization/locales/locale.global.templates/use_facet.pass.cpp When retrieving facets, the references are unused. test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp "std::ios_base::iostate err = ios.goodbit;" was completely unused here. test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp test/std/numerics/c.math/ctgmath.pass.cpp test/std/numerics/rand/rand.device/entropy.pass.cpp test/std/numerics/rand/rand.device/eval.pass.cpp test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp test/std/thread/futures/futures.promise/dtor.pass.cpp test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp These variables are verifying types but are otherwise unused. test/std/strings/basic.string/string.capacity/reserve.pass.cpp old_cap was unused (it's unclear to me whether it was intended to be used). test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp These tests contained unused characters. llvm-svn: 286847
OpenPOWER on IntegriCloud