summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [compiler-rt][test] Set shared_libasan_path in test/asan/lit.cfg on SolarisRainer Orth2019-06-261-1/+1
| | | | | | | | | | | | While checking warnings from the Solaris buildbots, I noticed llvm-lit: /opt/llvm-buildbot/home/solaris11-amd64/clang-solaris11-amd64/llvm/projects/compiler-rt/test/asan/lit.cfg:119: warning: %shared_libasan substitution not set but dynamic ASan is available. Fixed as follows. Tested on x86_64-pc-solaris2.11. Differential Revision: https://reviews.llvm.org/D63761 llvm-svn: 364394
* [NFC][InstCombine] Add shift amount reassociation tests (PR42391)Roman Lebedev2019-06-261-0/+167
| | | | | | | https://bugs.llvm.org/show_bug.cgi?id=42391 https://rise4fun.com/Alive/9E2 llvm-svn: 364393
* [clangd] Don't rename the namespace.Haojian Wu2019-06-263-10/+34
| | | | | | | | | | | | | | | | | Summary: Also fix a small bug -- the extra argument "-xc++" doesn't overwrite the language if the argument is present after the file name in the compiler command. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63759 llvm-svn: 364392
* Reland D61583 [ELF] Error on relocations to STT_SECTION symbols if the ↵Fangrui Song2019-06-2614-94/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sections were discarded This restores r361830 "[ELF] Error on relocations to STT_SECTION symbols if the sections were discarded" and dependent commits (r362218, r362497) which were reverted by r364321, with a fix of a --gdb-index issue. .rela.debug_ranges contains relocations of range list entries: // start address of a range list entry // old: 0; after r361830: 0 00000000000033a0 R_X86_64_64 .text._ZN2v88internal7Isolate7factoryEv + 0 // end address of a range list entry // old: 0xe; after r361830: 0 00000000000033a8 R_X86_64_64 .text._ZN2v88internal7Isolate7factoryEv + e If both start and end addresses of a range list entry resolve to 0, DWARFDebugRangeList::isEndOfListEntry() will return true, then the .debug_range decoding loop will terminate prematurely: while (true) { decode StartAddress decode EndAddress if (Entry.isEndOfListEntry()) // prematurely break; Entries.push_back(Entry); } In lld/ELF/SyntheticSections.cpp, readAddressAreas() will read incomplete address ranges and the resulting .gdb_index will be incomplete. For files that gdb hasn't loaded their debug info, gdb uses .gdb_index to map addresses to CUs. The absent entries make gdb fail to symbolize some addresses. To address this issue, we simply allow relocations to undefined symbols in DWARF.cpp:findAux() and let RelocationResolver resolve them. This patch should fix: [1] http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190603/659848.html [2] https://bugs.chromium.org/p/chromium/issues/detail?id=978067 llvm-svn: 364391
* [clangd] Add Value field to HoverInfoKadir Cetinkaya2019-06-263-3/+87
| | | | | | | | | | | | | | | | Summary: Put a symbols value information which is deduced from initializer expression into HoverInfo struct. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63330 llvm-svn: 364390
* [clangd] Enable extraction of system includes from custom toolchainsKadir Cetinkaya2019-06-267-1/+344
| | | | | | | | | | | | | | | | | | Summary: Some custom toolchains come with their own header files and compiler drivers. Those compiler drivers implicitly know about include search path for those headers. This patch aims to extract that information from drivers and add it to the command line when invoking clang frontend. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62804 llvm-svn: 364389
* [clangd] Link and initialize target infosKadir Cetinkaya2019-06-263-0/+37
| | | | llvm-svn: 364387
* [clang][Tooling] Infer target and mode from argv[0] when using ↵Kadir Cetinkaya2019-06-266-10/+110
| | | | | | | | | | | | | | | | | | | | | JSONCompilationDatabase Summary: Wraps JSON compilation database with a target and mode adding database wrapper. So that driver can correctly figure out which toolchain to use. Note that clients that wants to make use of this target discovery mechanism needs to link in TargetsInfos and initialize them at startup. Reviewers: ilya-biryukov Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63755 llvm-svn: 364386
* [Metadata] Add GNU extensions for call site DWARF symbolsDjordje Todorovic2019-06-261-0/+6
| | | | | | | | | | | | | | | | | | | As discussed on RFC (http://lists.llvm.org/pipermail/llvm-dev/2019-February/130094.html), this is set of patches that introduces debug information about call site and call site parameters. Since the LLVM has portion of this support (dumping DWARF 5 symbols for calls), we generate GNU extensions as well. All of that will be restricted under an option. ([1/13] Introduce the debug entry values.) Co-authored-by: Ananth Sowda <asowda@cisco.com> Co-authored-by: Nikola Prica <nikola.prica@rt-rk.com> Co-authored-by: Ivan Baev <ibaev@cisco.com> Differential Revision: https://reviews.llvm.org/D60712 llvm-svn: 364385
* [ExpandMemCmp] Honor prefer-vector-width.Clement Courbet2019-06-262-2/+74
| | | | | | | | | | | | Reviewers: gchatelet, echristo, spatel, atdt Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63769 llvm-svn: 364384
* [PowerPC] Fixed missing change flag of emitRLDICWhenLoweringJumpTablesKai Luo2019-06-261-9/+10
| | | | | | | | | PPCMIPeephole::emitRLDICWhenLoweringJumpTables should return a bool value to indicate optimization is conducted or not. Differential Revision: https://reviews.llvm.org/D63801 llvm-svn: 364383
* Teach the DAGCombine to fold this pattern(c1 and c2 is constant).QingShan Zhang2019-06-266-260/+162
| | | | | | | | | | | | | | | | | | // fold (sext (select cond, c1, c2)) -> (select cond, sext c1, sext c2) // fold (zext (select cond, c1, c2)) -> (select cond, zext c1, zext c2) // fold (aext (select cond, c1, c2)) -> (select cond, sext c1, sext c2) Sign extend the operands if it is any_extend, to keep the signess of the operands that, the other combine rule would apply. The any_extend is handled as zero extend for constants. i.e. t1: i8 = select t0, Constant:i8<-1>, Constant:i8<0> t2: i64 = any_extend t1 --> t3: i64 = select t0, Constant:i64<-1>, Constant:i64<0> --> t4: i64 = sign_extend_inreg t3 Differential Revision: https://reviews.llvm.org/D63318 llvm-svn: 364382
* [HIP] Support attribute hip_pinned_shadowYaxun Liu2019-06-2612-15/+120
| | | | | | | | | | | | | | | This patch introduces support of hip_pinned_shadow variable for HIP. A hip_pinned_shadow variable is a global variable with attribute hip_pinned_shadow. It has external linkage on device side and has no initializer. It has internal linkage on host side and has initializer or static constructor. It can be accessed in both device code and host code. This allows HIP runtime to implement support of HIP texture reference. Differential Revision: https://reviews.llvm.org/D62738 llvm-svn: 364381
* Fix build failure due to missing breakYaxun Liu2019-06-261-0/+2
| | | | llvm-svn: 364380
* Revert [llvm-objcopy][NFC] Refactor output target parsingRumeet Dhindsa2019-06-264-86/+36
| | | | | | | | | | | | | | | | This reverts r364254 (git commit 545f001d1b9a7b58a68d75e70bfc36c841de8999) This change causes some llvm-obcopy tests to fail with valgrind. Following is the output for basic-keep.test Command Output (stderr): -- ==107406== Conditional jump or move depends on uninitialised value(s) ==107406== at 0x1A30DD: executeObjcopy(llvm::objcopy::CopyConfig const&) (llvm-objcopy.cpp:235) ==107406== by 0x1A3935: main (llvm-objcopy.cpp:294) llvm-svn: 364379
* Revert [llvm-objcopy][NFCI] Fix build failure with GCCRumeet Dhindsa2019-06-261-2/+0
| | | | | | | | | | | | This reverts r364263 (git commit 81eb82840524818ec0ec14285c866c09b9634df0) This commit is related to r364254 which is causing some llvm-objcopy tests to fail with valgrind. Error: Conditional jump or move depends on uninitialised value(s) llvm-svn: 364378
* [NFC] Fix buildbot breaks due to r364375Nemanja Ivanovic2019-06-261-1/+1
| | | | | | | | For some reason, the update_llc_checks.py script produces checks for empty lines which cause failures. Corrected that to check for actual text produced by llc. llvm-svn: 364377
* [ARM] Fix -Wimplicit-fallthrough after D60709/r364331Fangrui Song2019-06-261-4/+3
| | | | llvm-svn: 364376
* [PowerPC][NFC] Add a TOC save test case prior to posting a related patchNemanja Ivanovic2019-06-261-0/+68
| | | | | | | | An upcoming patch will modify the behaviour with respect to saving the TOC in functions with indirect calls. Adding a test case so the patch will show the difference in codegen. llvm-svn: 364375
* gn build: Merge r364288.Peter Collingbourne2019-06-261-0/+1
| | | | llvm-svn: 364374
* [PowerPC] Mark FCOPYSIGN legal for FP vectorsNemanja Ivanovic2019-06-262-0/+29
| | | | | | | | | | This was just an omission in the back end. We have had the instructions for both single and double precision for a few HW generations, but never got around to legalizing these. Differential revision: https://reviews.llvm.org/D63634 llvm-svn: 364373
* [PowerPC][NFC] Move peephole optimization of RLDICR into a method.Kai Luo2019-06-261-47/+57
| | | | llvm-svn: 364372
* [WebAssembly] Fix accidental omission from rLLD364367Keno Fischer2019-06-261-0/+1
| | | | | | | | There was another place where handling for this relocation was missing that was accidentally omitted from rLLD364367, causing the newly added test to fail on the buildbots. llvm-svn: 364371
* MC: correct the emission of weak aliases in COFFSaleem Abdulrasool2019-06-266-9/+14
| | | | | | | | | | | The weak alias should have the characteristics set to `IMAGE_EXTERN_WEAK_SEARCH_ALIAS` to indicate that the weak external here is a symbol alias and that the symbol is aliased to a locally defined symbol. We were previously setting the characteristics to `IMAGE_EXTERN_WEAK_SEARCH_LIBRARY` which indicates that the symbol should be looked for in the libraries. llvm-svn: 364370
* Follow up fix for r364366.Dan Liew2019-06-261-1/+1
| | | | | | | | | When setting the parallelism group support MSan and use a syntactically compact condition. rdar://problem/51754620 llvm-svn: 364369
* [lld/WebAssembly] Slightly nicer error message for malformed input filesKeno Fischer2019-06-262-1/+2
| | | | | | | | | | | | | | | | | | | Summary: Before: ``` wasm-ld: error: Relocations not in offset order ``` After ``` wasm-ld: error: While processing `libjulia.so`: Relocations not in offset order ``` At least this way you get to find out which input file is malformed. Reviewers: sbc100 Differential Revision: https://reviews.llvm.org/D63694 llvm-svn: 364368
* [WebAssembly] Fix list of relocations with addends in lldKeno Fischer2019-06-266-22/+38
| | | | | | | | | | | | | Summary: The list of relocations with addend in lld was missing `R_WASM_MEMORY_ADDR_REL_SLEB`, causing `wasm-ld` to generate corrupted output. This fixes that problem and while we're at it pulls the list of such relocations into the Wasm.h header, to avoid duplicating it in multiple places. Reviewers: sbc100 Differential Revision: https://reviews.llvm.org/D63696 llvm-svn: 364367
* Add USan+ASan and UBSan+TSan tests to shadow-memory lit parallelism group.Dan Liew2019-06-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously we were running these tests without the "shadow-memory" lit parallelism group even though we run the ASan and TSan tests in this group to avoid problems with many processes using shadow memory in parallel. On my local machine the UBSan+TSan tests would previously timeout if I set a 30 second per test limit. With this change I no longer see individual test timeouts. This change was made in response to the greendragon build bot reporting individual test timeouts for these tests. Given that the UBSan+ASan and UBSan+TSan tests did not have a parallelism group previously it's likely that some other change has caused the performance degradation. However I haven't been able to track down the cause so until we do, this change seems reasonable and is in line with what we already do with ASan and TSan tests. rdar://problem/51754620 Reviewers: yln, kubamracek, vsk, samsonov Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D63797 llvm-svn: 364366
* [analyzer] exploded-graph-rewriter: Prettier location context dumps.Artem Dergachev2019-06-262-2/+3
| | | | | | Make them span wider. llvm-svn: 364365
* Teach TableGen Intrin Emitter to handle LLVMPointerType<llvm_any_ty>Erich Keane2019-06-262-0/+56
| | | | | | | | | | r363233 rewrote a bunch of the Intrin Emitter code, however the new function to update the arg codes did not properly consider a pointer to an any. This patch adds that logic. Differential Revision: https://reviews.llvm.org/D63507 llvm-svn: 364364
* Revert "Change the ABI version and ABI namespace to be `_LIBCPP_VERSION`"Eric Fiselier2019-06-261-12/+5
| | | | | | | | | There are some suspicious bot failures that I want to ensure aren't caused by this patch. I'll recommit tomorrow. llvm-svn: 364363
* print-supported-cpus quality of life patch.Ziang Wan2019-06-255-4/+37
| | | | | | | Claim all input files so that clang does not give a warning. Add two short-cut aliases: -mcpu=? and -mtune=?. llvm-svn: 364362
* Fix a typo in help text.Adrian McCarthy2019-06-251-1/+1
| | | | llvm-svn: 364361
* [WebAssembly] Remove catch_all from AsmParserHeejin Ahn2019-06-251-4/+0
| | | | | | | | | | | | | | | | | Summary: `catch_all` is from the first version of EH proposal and now has been removed. There were no tests covering this, and thus no tests to remove or fix. Reviewers: aardappel Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63737 llvm-svn: 364360
* Revert Devirtualize destructor of final class.Rumeet Dhindsa2019-06-252-50/+3
| | | | | | This reverts r364100 (git commit 405c2b16225fc6eaf5eb8ba3ce584699a3b159ef) llvm-svn: 364359
* Add github lockdown app to auto-close pull requests.Tom Stellard2019-06-251-0/+33
| | | | llvm-svn: 364358
* Dump what value failed byval attribute verificationReid Kleckner2019-06-251-1/+1
| | | | | | | This verifier check is failing for us while doing ThinLTO on Chrome for x86, see https://crbug.com/978218, and this helps to debug the problem. llvm-svn: 364357
* [GWP-ASan] Guard against recursive allocs. Pack TLS for perf.Mitch Phillips2019-06-252-15/+51
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Add a recursivity guard for GPA::allocate(). This means that any recursive allocations will fall back to the supporting allocator. In future patches, we will introduce stack trace collection support. The unwinder will be provided by the supporting allocator, and we can't guarantee they don't call malloc() (e.g. backtrace() on posix may call dlopen(), which may call malloc(). Furthermore, this patch packs the new TLS recursivity guard into a thread local struct, so that TLS variables should be hopefully not fall across cache lines. Reviewers: vlad.tsyrklevich, morehouse, eugenis Reviewed By: eugenis Subscribers: kubamracek, #sanitizers, llvm-commits, eugenis Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D63736 llvm-svn: 364356
* Revert "Add ReadCStringFromMemory for faster string reads"Antonio Afonso2019-06-255-136/+7
| | | | | | | | This reverts commit a7335393f50246b59db450dc6005f7c8f29e73a6. It seems this is breaking a bunch of tests (https://reviews.llvm.org/D62503#1549874) so reverting until I find the time to repro and fix. llvm-svn: 364355
* Change the ABI version and ABI namespace to be `_LIBCPP_VERSION`Eric Fiselier2019-06-251-5/+12
| | | | | | | | | | | | | when _LIBCPP_ABI_UNSTABLE is defined. User defined _LIBCPP_ABI_NAMESPACE will still be respected, but the default version namespace in unstable mode will be the libc++ version (Currently '__9000'). Previously `_LIBCPP_ABI_VERSION` and `_LIBCPP_ABI_NAMESPACE` were `1` and `__1` respectively, whuch conflicted with the stable ABI llvm-svn: 364354
* [MachinePipeliner] Fix risky iterator usage R++, --RJinsong Ji2019-06-252-8/+4
| | | | | | | | | | | | | When we calculate MII, we use two loops, one with iterator R++ to check whether we can reserve the resource, then --R to move back the iterator to do reservation. This is risky, as R++, --R may not point to the same element at all. The can cause wrong MII. Differential Revision: https://reviews.llvm.org/D63536 llvm-svn: 364353
* android: enable double-word CAS on x64Saleem Abdulrasool2019-06-252-0/+2
| | | | | | | | | | | The android target assumes that for the x86_64 target, the CPU supports SSE4.2 and popcnt. This implies that the CPU is Nehalem or newer. This should be sufficiently new to provide the double word compare and exchange instruction. This allows us to directly lower `__sync_val_compare_and_swap_16` to a `cmpxchg16b`. It appears that the libatomic in android's NDK does not provide the implementation for lowering calls to the library function. llvm-svn: 364352
* [dotest] Remove unused functionJonas Devlieghere2019-06-251-9/+1
| | | | | | The function `EnvArray` has no used. llvm-svn: 364351
* [PowerPC][NFC]Add a test for MachinePipeliner bugJinsong Ji2019-06-251-0/+36
| | | | llvm-svn: 364350
* Don't look for the TargetFrameLowering in the implementationMatt Arsenault2019-06-254-8/+4
| | | | | | The same oddity was apparently copy-pasted between multiple targets. llvm-svn: 364349
* [InstCombine] Simplify icmp ult/uge (shl %x, C2), C1 iff C1 is power of two ↵Huihui Zhang2019-06-253-26/+47
| | | | | | | | | | | | | | | | | | | | | | | -> icmp eq/ne (and %x, (lshr -C1, C2)), 0. Simplify 'shl' inequality test into 'and' equality test. This pattern happens in the middle-end while simplifying bitfield access, Exposed in https://reviews.llvm.org/D63505 https://rise4fun.com/Alive/6uz Reviewers: lebedev.ri, efriedma Reviewed By: lebedev.ri Subscribers: spatel, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63675 llvm-svn: 364348
* Remove redundant expression evaluation context when substituting into aRichard Smith2019-06-251-7/+5
| | | | | | | | template argument. We do need one of these but we don't need two. llvm-svn: 364347
* [LFTR] Adjust debug output to include extensions (if any)Philip Reames2019-06-251-7/+8
| | | | llvm-svn: 364346
* [scudo] Correct a behavior on the shared TSD registryKostya Kortchinsky2019-06-252-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There is an error in the shared TSD registry logic when looking for a TSD in the slow path. There is an unlikely event when a TSD's precedence was 0 after attempting a `tryLock` which indicated that it was grabbed by another thread in between. We dealt with that case by continuing to the next iteration, but that meant that the `Index` was not increased and we ended up trying to lock the same TSD. This would manifest in heavy contention, and in the end we would still lock a TSD, but that was a wasted iteration. So, do not `continue`, just skip the TSD as a potential candidate. This is in both the standalone & non-standalone versions. Reviewers: morehouse, eugenis, vitalybuka, hctim Reviewed By: morehouse Subscribers: delcypher, #sanitizers, llvm-commits Tags: #llvm, #sanitizers Differential Revision: https://reviews.llvm.org/D63783 llvm-svn: 364345
* Add a defensive check for nullptr as in the block above.Adrian Prantl2019-06-251-1/+1
| | | | | | | | | Unfortunately I had to work backwards from a crash log, so I don't have a good testcase at this point in time. rdar://problem/51874647 llvm-svn: 364344
OpenPOWER on IntegriCloud