summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLD][ELF] - Stop using binary input in invalid/tls-symbol.s test. NFCI.George Rimar2019-02-282-3/+22
| | | | | | We can use yaml2obj instead, patch does this. llvm-svn: 355075
* [llvm-objdump] - Improve the error message for "removing a section that is ↵George Rimar2019-02-282-7/+7
| | | | | | | | | | used by relocation" case. This refines/improves the error message introduced in D58625 Differential revision: https://reviews.llvm.org/D58709 llvm-svn: 355074
* [llvm-readobj] - Fix the invalid dumping of the dynamic sections without ↵George Rimar2019-02-282-19/+91
| | | | | | | | | | | | | | | | terminating DT_NULL entry. This is https://bugs.llvm.org/show_bug.cgi?id=40861, Previously llvm-readobj would print the DT_NULL sometimes for the dynamic section that has no terminator entry. The logic of printDynamicTable was a bit overcomplicated. I rewrote it slightly to fix the issue and commented. Differential revision: https://reviews.llvm.org/D58716 llvm-svn: 355073
* [ValueTracking] More accurate unsigned add overflow detectionNikita Popov2019-02-285-28/+20
| | | | | | | | | | | | Part of D58593. Compute precise overflow conditions based on all known bits, rather than just the sign bits. Unsigned a + b overflows iff a > ~b, and we can determine whether this always/never happens based on the minimal and maximal values achievable for a and ~b subject to the known bits constraint. llvm-svn: 355072
* [X86] Use PreprocessISelDAG to convert vector sra/srl/shl to the X86 ↵Craig Topper2019-02-283-121/+40
| | | | | | | | | | | | specific variable shift ISD opcodes. These allows use to use the same set of isel patterns for sra/srl/shl which are undefined for out of range shifts and intrinsic shifts which aren't undefined. Doing this late allows DAG combine to have every opportunity to optimize the sra/srl/shl nodes. This removes about 7000 bytes from the isel table and simplies the td files. llvm-svn: 355071
* [Dominators] Avoid potentially quadratic std::is_permutationFangrui Song2019-02-281-7/+14
| | | | | | | | | | | | | | | | | | | | Summary: If the two sequences are not equal, std::is_permutation may be O(N^2) and indeed the case in libstdc++ and libc++. Use SmallPtrSet to prevent pessimizing cases. On my machine, SmallPtrSet starts to outperform std::is_permutation when there are 16 elements. Reviewers: kuhar Reviewed By: kuhar Subscribers: kristina, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58373 llvm-svn: 355070
* [SelectionDAG] Strengthen assertions about usage of AtomicSDNodesPhilip Reames2019-02-281-1/+6
| | | | | | | | | | | | In D57601, I described the expectations around usage of AtomicSDNode and LoadSDNode/StoreSDNode w.r.t. atomic and volatiles. This patch simply embeds those expectations in assertions so that they can't be accidentally weakened. Note: The reason only AtomicSDNodes of ATOMIC_LOAD and ATOMIC_STORE opcode are currently checked is that AMDGPU has an intrinsic which gets lowered to an ATOMIC_LOAD_FADD w/o a corresponding atomic MMO. This is suspicious, and I've brought it to the attention of the relevant developers. Once resolved, I'll strengthen that assertion. Note 2: If this breaks your out-of-tree backend, go read the update instructions associated w/the previously mentioned patch. This will assert on (a subset of) things you need to update per those instructions. Differential Revision: https://reviews.llvm.org/D58738 llvm-svn: 355069
* Fix IR/Analysis layering issue with OptBisectRichard Trieu2019-02-287-106/+75
| | | | | | | | | | | | | OptBisect is in IR due to LLVMContext using it. However, it uses IR units from Analysis as well. This change moves getDescription functions from OptBisect to their respective IR units. Generating names for IR units will now be up to the callers, keeping the Analysis IR units in Analysis. To prevent unnecessary string generation, isEnabled function is added so that callers know when the description needs to be generated. Differential Revision: https://reviews.llvm.org/D58406 llvm-svn: 355068
* Fix SupportTests.exe/AllocationTests/MappedMemoryTest.AllocAndReleaseHuge ↵Alexandre Ganea2019-02-281-3/+3
| | | | | | when the machine doesn't have large pages enabled. llvm-svn: 355067
* Fix non-Windows platforms build break introduced by r355065. Fixes:Alexandre Ganea2019-02-281-0/+1
| | | | | | | | | | In file included from /home/buildbots/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm/lib/Support/Memory.cpp:14: /home/buildbots/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm/include/llvm/Support/Memory.h:38:14: error: private field 'Flags' is not used [-Werror,-Wunused-private-field] unsigned Flags = 0; ^ 1 error generated. llvm-svn: 355066
* [Memory] Add basic support for large/huge memory pagesAlexandre Ganea2019-02-284-21/+77
| | | | | | | | | | | | | | | | | This patch introduces Memory::MF_HUGE_HINT which indicates that allocateMappedMemory() shall return a pointer to a large memory page. However the flag is a hint because we're not guaranteed in any way that we will get back a large memory page. There are several restrictions: - Large/huge memory pages aren't enabled by default on modern OSes (Windows 10 and Linux at least), and should be manually enabled/reserved. - Once enabled, it should be kept in mind that large pages are physical only, they can't be swapped. - Memory fragmentation can affect the availability of large pages, especially after running the OS for a long time and/or running along many other applications. Memory::allocateMappedMemory() will fallback to 4KB pages if it can't allocate 2MB large pages (if Memory::MF_HUGE_HINT is provided) Currently, Memory::MF_HUGE_HINT only works on Windows. The hint will be ignored on Linux, 4KB pages will always be returned. Differential Revision: https://reviews.llvm.org/D58718 llvm-svn: 355065
* [sanitizer] Got rid of text relocations in i386 vfork interceptor.Evgeniy Stepanov2019-02-281-2/+6
| | | | llvm-svn: 355064
* Move Symbols.cpp files.Jason Molenda2019-02-281-8/+9
| | | | llvm-svn: 355063
* Add username to TODO comment in sanitizer to satisfy sanitizer lint check. NFCDouglas Yung2019-02-281-1/+1
| | | | llvm-svn: 355062
* [clang][index-while-building][NFC] Comment about implementation detail in ↵Jan Korous2019-02-281-0/+1
| | | | | | FileIndexRecord llvm-svn: 355061
* Temporarily revert "ArgumentPromotion should copy all metadata to new ↵Eric Christopher2019-02-283-57/+9
| | | | | | | | Function" and the dependent patch "Refine ArgPromotion metadata handling" as they're causing segfaults in argument promotion. This reverts commits r354032 and r353537. llvm-svn: 355060
* [X86] Use X86::LAST_VALID_COND instead of assuming X86::COND_S is the last ↵Craig Topper2019-02-281-1/+1
| | | | | | encoding. NFC llvm-svn: 355059
* Ensure that set constrained asm operands are not affected by truncation.Joerg Sonnenberger2019-02-282-2/+8
| | | | llvm-svn: 355058
* AMDGPU/GlobalISel: Add regbankselect test for phisMatt Arsenault2019-02-281-0/+1434
| | | | | | | Add baseline for future fixes. These mostly show how this is broken and producing illegal situations. llvm-svn: 355057
* AMDGPU: Fix typoMatt Arsenault2019-02-281-1/+1
| | | | llvm-svn: 355056
* [Reprodicuers] Check initializationJonas Devlieghere2019-02-281-0/+4
| | | | | | | If the reproducer is not initialzied, the call to ::Instance() will result in an assertion. llvm-svn: 355055
* [CodeGen] Fix some broken IR generated by -fsanitize=unsigned-integer-overflowErik Pilkington2019-02-282-6/+39
| | | | | | | | | | | | | | I think the author of the function assumed that `GetInsertBlock()` wouldn't change from where `atomicPHI` was created, but this isn't true when `-fsanitize=unsigned-integer-overflow` is enabled (we generate an overflow/continuation label). Fix by keeping track of the block we want to return to to complete the cmpxchg loop. rdar://48406558 Differential revision: https://reviews.llvm.org/D58744 llvm-svn: 355054
* [NFC][TSan] Don't define GetStackTrace when compiling for GoJulian Lettner2019-02-281-0/+2
| | | | | | rdar://48455255 llvm-svn: 355053
* [NFC][Sanitizer] Use correct WEAK annotation to make Windows workJulian Lettner2019-02-281-1/+1
| | | | | | | The previous fix didn't work for Windows: https://github.com/llvm/llvm-project/commit/52b751088b11547e0f4ef0589ebbe5e57752c68c llvm-svn: 355052
* AMDGPU: Enable function calls by defaultMatt Arsenault2019-02-286-15/+48
| | | | | | | Fixes some crashes on illegal call situations which are unfortunately still valid IR. llvm-svn: 355051
* [AArch64] Generate FP16 vector compare instructions.Abderrazek Zaafrani2019-02-283-242/+40
| | | | | | https://reviews.llvm.org/D58561 llvm-svn: 355050
* AMDGPU: Fix crashes in invalid call casesMatt Arsenault2019-02-285-26/+54
| | | | | | | We have to at least tolerate calls to kernels, possibly with a mismatched calling convention on the callsite. llvm-svn: 355049
* GlobalISel: Implement fewerElementsVector for phiMatt Arsenault2019-02-285-9/+386
| | | | llvm-svn: 355048
* GlobalISel: Implement moreElementsVector for phiMatt Arsenault2019-02-284-0/+98
| | | | llvm-svn: 355047
* [Sanitizer] Attempt to fix linker error on ARM variantsJulian Lettner2019-02-272-11/+14
| | | | | | | Previous commit: https://github.com/llvm/llvm-project/commit/a0884da62a471f08c65a03e337aea23203a43eb8 llvm-svn: 355046
* [compiler-rt] Windows Trace Logging for error reports.Matthew G McGovern2019-02-272-2/+36
| | | | | | | | Adds option for collecting sanitixer dumps via trace logging. - Set log_to_syslog=1 to enable this output. - Consult https://aka.ms/windowstracelogging for details on use. llvm-svn: 355045
* [InstrProf] Use separate comdat group for data and countersReid Kleckner2019-02-275-27/+27
| | | | | | | | | | | | | | | | | | | | | | | Summary: I hadn't realized that instrumentation runs before inlining, so we can't use the function as the comdat group. Doing so can create relocations against discarded sections when references to discarded __profc_ variables are inlined into functions outside the function's comdat group. In the future, perhaps we should consider standardizing the comdat group names that ELF and COFF use. It will save object file size, since __profv_$sym won't appear in the symbol table again. Reviewers: xur, vsk Subscribers: eraman, hiraditya, cfe-commits, #sanitizers, llvm-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58737 llvm-svn: 355044
* [NFC][libc++] Update comment about oldest supported macosx for back-deploymentLouis Dionne2019-02-271-1/+1
| | | | llvm-svn: 355043
* Remove unnecessary demangling operation (NFC)Adrian Prantl2019-02-271-7/+5
| | | | | | | | | | | | This extra call to the demangler doesn't affect the performance of C++ because the result is being cached anyway; but I'm working on a patch to the Swift branch that uses extra contextual information to provide a more accurate demangling result. In that case this call would be extra and unnecessary work. Differential Revision: https://reviews.llvm.org/D58720 llvm-svn: 355042
* [sanitizer] Fix compilation errors in r355030.Evgeniy Stepanov2019-02-275-5/+12
| | | | | | | | Disable hwasan interceptor on non-linux, non-x86-or-arm platforms. Add @plt to the asm call that clang intergrated-as infers but gcc does not. llvm-svn: 355041
* [MemorySSA] Make insertDef insert corresponding phi nodes.Alina Sbirlea2019-02-275-9/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The original assumption for the insertDef method was that it would not materialize Defs out of no-where, hence it will not insert phis needed after inserting a Def. However, when cloning an instruction (use case used in LICM), we do materialize Defs "out of no-where". If the block receiving a Def has at least one other Def, then no processing is needed. If the block just received its first Def, we must check where Phi placement is needed. The only new usage of insertDef is in LICM, hence the trigger for the bug. But the original goal of the method also fails to apply for the move() method. If we move a Def from the entry point of a diamond to either the left or right blocks, then the merge block must add a phi. While this usecase does not currently occur, or may be viewed as an incorrect transformation, MSSA must behave corectly given the scenario. Resolves PR40749 and PR40754. Reviewers: george.burgess.iv Subscribers: sanjoy, jlebar, Prazek, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58652 llvm-svn: 355040
* [NFC][Sanitizer] Pull up GetStackTrace into sanitizer_commonJulian Lettner2019-02-2713-108/+114
| | | | | | | | | | | | | | | | | | | | We already independently declare GetStackTrace in all (except TSan) sanitizer runtime headers. Lets move it to sanitizer_stacktrace.h to have one canonical way to fill in a BufferedStackFrame. Also enables us to use it in sanitizer_common itself. This patch defines GetStackTrace for TSan and moves the function from ubsan_diag.cc to ubsan_diag_standalone.cc to avoid duplicate symbols for the UBSan-ASan runtime. Other than that this patch just moves the code out of headers and into the correct namespace. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58651 llvm-svn: 355039
* Default to Secure PLT on PPC for NetBSD and OpenBSD.Joerg Sonnenberger2019-02-272-0/+7
| | | | | | This matches the default settings of clang. llvm-svn: 355038
* Remove dependency from Host -> Core.Zachary Turner2019-02-271-1/+0
| | | | | | | I wasn't actually trying to eliminate this one, but looks like it happened as a side effect of moving Symbols out of Host. llvm-svn: 355037
* [clang][index-while-building][NFC] FileIndexRecord - Comments, replace auto ↵Jan Korous2019-02-273-14/+12
| | | | | | | | with type Differential Revision: https://reviews.llvm.org/D58478 llvm-svn: 355036
* [clang][index-while-building] FileIndexRecordJan Korous2019-02-274-0/+160
| | | | | | | | | | | Basic data structures for index Tests are missing from this patch - will be covered properly by tests for the whole feature. I'm just trying to split into smaller patches to make it easier for reviewers. Differential Revision: https://reviews.llvm.org/D58478 llvm-svn: 355035
* Fixup compilation/test failures after r354960 and r355013.James Y Knight2019-02-272-4/+7
| | | | llvm-svn: 355034
* Use Secure PLT as default on NetBSD/PowerPC.Joerg Sonnenberger2019-02-272-1/+6
| | | | llvm-svn: 355033
* Move Host/Symbols.cpp to Symbols/LocateSymbolFile.cppZachary Turner2019-02-2718-33/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | Given that we have a target named Symbols, one wonders why a file named Symbols.cpp is not in this target. To be clear, the functions exposed from this file are really focused on *locating* a symbol file on a given host, which is where the ambiguity comes in. However, it makes more sense conceptually to be in the Symbols target. While some of the specific places to search for symbol files might change depending on the Host, this is not inherently true in the same way that, for example, "accessing the file system" or "starting threads" is fundamentally dependent on the Host. PDBs, for example, recently became a reality on non-Windows platforms, and it's theoretically possible that DSYMs could become a thing on non MacOSX platforms (maybe in a remote debugging scenario). Other types of symbol files, such as DWO, DWP, etc have never been tied to any Host platform anyway. After this patch, there is only one remaining dependency from Host to Target. Differential Revision: https://reviews.llvm.org/D58730 llvm-svn: 355032
* [llvm-cxxfilt] Re-enable split and demangle stdin input on certain ↵Matt Davis2019-02-272-7/+101
| | | | | | | | | | | | | | | | non-alphanumerics. This restores the patch that splits demangled stdin input on non-alphanumerics. I had reverted this patch earlier because it broke Windows build-bots. I have updated the test so that it passes on Windows. I was running the test from powershell and never saw the issue until I switched to the mingw shell. This reverts commit 628ab5c6820bdf3bb5a8e494b0fd9e7312ce7150. llvm-svn: 355031
* [hwasan, asan] Intercept vfork.Evgeniy Stepanov2019-02-2724-4/+356
| | | | | | | | | | | | | | | Summary: Intercept vfork on arm, aarch64, i386 and x86_64. Reviewers: pcc, vitalybuka Subscribers: kubamracek, mgorny, javed.absar, krytarowski, kristof.beyls, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D58533 llvm-svn: 355030
* [LLD][COFF] Support /threads[:no] like the ELF driverAlexandre Ganea2019-02-277-15/+33
| | | | | | Differential review: https://reviews.llvm.org/D58594 llvm-svn: 355029
* [hwasan] Fix tests after .cc->.cpp renaming.Evgeniy Stepanov2019-02-271-2/+2
| | | | llvm-svn: 355028
* [OPENMP]Delay emission of the error for unsupported types.Alexey Bataev2019-02-278-7/+214
| | | | | | | If the type is unsupported on the device side, it still must be emitted, but we should emit errors for operations with such types. llvm-svn: 355027
* Pass arguments correctly to the objc object checker on arm64Jim Ingham2019-02-273-2/+39
| | | | | | | | | | | | | | | | | Traditionally objc had two entry points, objc_msgSend for scalar return methods, and objc_msgSend_stret for struct return convention methods. But on arm64 the second was not needed (since arm64 doesn't use an argument register for the struct return pointer) so it was removed. The code that dispatches to the objc object checker when it sees some flavor of objc_msgSend was not aware of this change so was sending the wrong arguments to the checker. <rdar://problem/48315890> Differential Revision: https://reviews.llvm.org/D58699 llvm-svn: 355026
OpenPOWER on IntegriCloud