summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [Local] replaceAllDbgUsesWith: Update debug values before RAUWVedant Kumar2018-07-0612-69/+544
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The replaceAllDbgUsesWith utility helps passes preserve debug info when replacing one value with another. This improves upon the existing insertReplacementDbgValues API by: - Updating debug intrinsics in-place, while preventing use-before-def of the replacement value. - Falling back to salvageDebugInfo when a replacement can't be made. - Moving the responsibiliy for rewriting llvm.dbg.* DIExpressions into common utility code. Along with the API change, this teaches replaceAllDbgUsesWith how to create DIExpressions for three basic integer and pointer conversions: - The no-op conversion. Applies when the values have the same width, or have bit-for-bit compatible pointer representations. - Truncation. Applies when the new value is wider than the old one. - Zero/sign extension. Applies when the new value is narrower than the old one. Testing: - check-llvm, check-clang, a stage2 `-g -O3` build of clang, regression/unit testing. - This resolves a number of mis-sized dbg.value diagnostics from Debugify. Differential Revision: https://reviews.llvm.org/D48676 llvm-svn: 336451
* [InstCombine] add more tests with poison and undef; NFCSanjay Patel2018-07-061-5/+540
| | | | | | | | As discussed in D48987 and D48893, there are many different ways to go wrong depending on the binop (and as shown here we already do go wrong in some cases). llvm-svn: 336450
* Recommit "[CMake] Run libFuzzer tests with check-all."Yvan Roux2018-07-061-2/+0
| | | | | | Since problematic tests on AArch64 were disabled at r336446. llvm-svn: 336449
* AMDGPU: Fix UBSan error caused by r335942Tom Stellard2018-07-063-24/+21
| | | | | | | | | | | | | | Summary: Fixes PR38071. Reviewers: arsenm, dstenb Reviewed By: arsenm Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D48979 llvm-svn: 336448
* [MSan] Add functions to enable/disable interceptor checks.Matt Morehouse2018-07-064-0/+69
| | | | | | | | | | | | | | | | | | Summary: The motivation for this change is to make libFuzzer+MSan possible without instrumenting libFuzzer. See https://github.com/google/sanitizers/issues/958. Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D48890 llvm-svn: 336447
* [libFuzzer] Disable hanging tests on AArch64Yvan Roux2018-07-063-0/+3
| | | | | | | | | Disable problematic tests which broke AArch64 bots. Details available in Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=38034 Differential Revision: https://reviews.llvm.org/D49011 llvm-svn: 336446
* [scudo] Add some logs for AndroidKostya Kortchinsky2018-07-061-0/+3
| | | | | | | | | | | | | | | | Summary: Namely, set the abort message, and allow to write the message to syslog if the option is enabled. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48902 llvm-svn: 336445
* [Constants] extend getBinOpIdentity(); NFCSanjay Patel2018-07-062-28/+50
| | | | | | | | The enhanced version will be used in D48893 and related patches and an almost identical (fadd is different) version is proposed in D28907, so adding this as a preliminary step. llvm-svn: 336444
* [ELF] - Add test for empty version in a symbol name. George Rimar2018-07-061-0/+20
| | | | | | | This covers the following line which was untested: https://github.com/llvm-mirror/lld/blob/master/ELF/Symbols.cpp#L170 llvm-svn: 336443
* [Constant] add undef element query for vector constants; NFCSanjay Patel2018-07-062-0/+14
| | | | | | | This is likely to be used in D48987 and similar patches, so adding it as an NFC preliminary step. llvm-svn: 336442
* [ARM] ParallelDSP: added statistics, NFC.Sjoerd Meijer2018-07-0614-20/+25
| | | | | | | | | Added statistics for the number of SMLAD instructions created, and als renamed the pass name to -arm-parallel-dsp. Differential Revision: https://reviews.llvm.org/D48971 llvm-svn: 336441
* Commit rL336426 cause buildbot failuresDiogo N. Sampaio2018-07-062-6/+6
| | | | | | | | http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/50537/testReport/junit/LLVM/CodeGen_AArch64/FoldRedundantShiftedMasking_ll/ This removes the comments of the function label causing this error. llvm-svn: 336440
* [LoopSink] Make the enforcement of determinism deterministic.Benjamin Kramer2018-07-061-4/+6
| | | | | | | | | | | | | | LoopBlockNumber is a DenseMap<BasicBlock*, int>, comparing the result of find() will compare a pair<BasicBlock*, int>. That's of course depending on pointer ordering which varies from run to run. Reverse iteration doesn't find this because we're copying to a vector first. This bug has been there since 2016 but only recently showed up on clang selfhost with FDO and ThinLTO, which is also why I didn't manage to get a reasonable test case for this. Add an assert that would've caught this. llvm-svn: 336439
* Define the __STDC_FORMAT_MACROS to avoid test failure on some platforms.Kelvin Li2018-07-061-0/+5
| | | | | | | | | ompt/misc/api_calls_from_other_thread.cpp ompt/misc/interoperability.cpp Differential Revision: https://reviews.llvm.org/D48984 llvm-svn: 336438
* [llvm-mca] A write latency cannot be a negative value. NFCAndrea Di Biagio2018-07-063-10/+10
| | | | llvm-svn: 336437
* [ELF] - Remove dead code #2.George Rimar2018-07-061-4/+1
| | | | | | 'Pos' is never can be 0 here. llvm-svn: 336436
* [ELF] - Remove dead code. NFC.George Rimar2018-07-061-2/+0
| | | | | | 'Pos' can never be 0. llvm-svn: 336435
* [AArch64] Armv8.4-A: TLB supportSjoerd Meijer2018-07-064-0/+470
| | | | | | | | This adds: - outer shareable TLB Maintenance instructions, and - TLB range maintenance instructions. llvm-svn: 336434
* [dsymutil] Emit label at the begin of a CUJonas Devlieghere2018-07-062-0/+9
| | | | | | | | When emitting a CU, store the MCSymbol pointing to the beginning of the CU. We'll need this information later when emitting the .debug_names section (DWARF5 accelerator table). llvm-svn: 336433
* Recommit: [AArch64] Armv8.4-A: Flag manipulation instructionsSjoerd Meijer2018-07-066-0/+143
| | | | | | Now with the asm operand definition included. llvm-svn: 336432
* [clangd] Make SymbolOrigin an enum class, rather than a plain enum.Sam McCall2018-07-065-16/+24
| | | | | | | I never intended to define namespace pollution like clangd::AST, clangd::Unknown etc. Oops! llvm-svn: 336431
* Add a file that was missing in r336425Philip Pfaffe2018-07-061-0/+513
| | | | llvm-svn: 336430
* [Driver,AArch64] Add support for -mcpu=native.Florian Hahn2018-07-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | This patches adds support for passing -mcpu=native for AArch64. It will get turned into the host CPU name, before we get the target features. CPU = native is handled in a similar fashion in getAArch64MicroArchFetauresFromMtune and getAArch64TargetCPU already. Having a good test case for this is hard, as it depends on the host CPU of the machine running the test. But we can check that native has been replaced with something else. When cross-compiling, we will get a CPU name from the host architecture and get ` the clang compiler does not support '-mcpu=native'` as error message, which seems reasonable to me. Reviewers: rengolin, peter.smith, dlj, javed.absar, t.p.northover Reviewed By: peter.smith Tags: #clang Differential Revision: https://reviews.llvm.org/D48931 llvm-svn: 336429
* Added missing semicolonDiogo N. Sampaio2018-07-061-2/+1
| | | | llvm-svn: 336428
* [SemaCodeComplete] Expose a method to create CodeCompletionString for macros.Eric Liu2018-07-062-44/+56
| | | | | | | | | | | | | | | | | Summary: The method only takes PPreprocessor and don't require structures that might not be available (e.g. Sema and ASTContext) when CodeCompletionString needs to be generated for macros. Reviewers: sammccall Reviewed By: sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48973 llvm-svn: 336427
* [SelectionDAG] https://reviews.llvm.org/D48278Diogo N. Sampaio2018-07-064-20/+319
| | | | | | | | | | | | | | | | D48278 Allow to reduce redundant shift masks. For example: x1 = x & 0xAB00 x2 = (x >> 8) & 0xAB can be reduced to: x1 = x & 0xAB00 x2 = x1 >> 8 It only allows folding when the masks and shift values are constants. llvm-svn: 336426
* Update isl to isl-0.19-224-gce84a511Tobias Grosser2018-07-0624-640/+424
| | | | | | | | This is a maintenance update. Besides many minor changes it ships two functions "isl_*_list_size" and "isl_*_list_get_at" which will allow us to simplify the iterator implementation in Polly. llvm-svn: 336425
* Relax filechecks in r336405 testsHans Wennborg2018-07-063-12/+12
| | | | | | | | | | | | | | | | | | | They were failing in Chromium's packaging builds with: C:\b\rr\tmphqfaff\w\src\third_party\llvm\tools\lld\test\COFF\pdb-globals-dia-vfunc-collision2.test:24:8: error: expected string not found in input CHECK: func [0x00001060+ 0 - 0x0000106c-12 | sizeof= 12] (FPO) virtual int __cdecl A132() ^ <stdin>:8:11: note: scanning from here struct S [sizeof = 8] { ^ <stdin>:9:2: note: possible intended match here func [0x00001060+ 0 - 0x0000106c-12 | sizeof= 12] (FPO) virtual int __cdecl S::A132() ^ Maybe due to different DIA versions. llvm-svn: 336424
* dos2unixHans Wennborg2018-07-063-93/+93
| | | | llvm-svn: 336423
* Revert [AArch64] Armv8.4-A: Flag manipulation instructionsSjoerd Meijer2018-07-065-117/+0
| | | | | | It's causing build errors. llvm-svn: 336422
* [AArch64] Armv8.4-A: Flag manipulation instructionsSjoerd Meijer2018-07-065-0/+117
| | | | | | | | These instructions are added to AArch64 only. Differential Revision: https://reviews.llvm.org/D48926 llvm-svn: 336421
* [llvm-mca] improve the instruction issue logic implemented by the Scheduler.Andrea Di Biagio2018-07-065-68/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the Scheduler heuristic used to select the next instruction to issue to the pipelines. The motivating example is test X86/BtVer2/add-sequence.s, for which llvm-mca wrongly reported an estimated IPC of 1.50. According to perf, the actual IPC for that test should have been ~2.00. It turns out that an IPC of 2.00 for test add-sequence.s cannot possibly be predicted by a Scheduler that only prioritizes instructions based on their "age". A similar issue also affected test X86/BtVer2/dependent-pmuld-paddd.s, for which llvm-mca wrongly estimated an IPC of 0.84 instead of an IPC of 1.00. Instructions in the ReadyQueue are now ranked based on two factors: - The "age" of an instruction. - The number of unique users of writes associated with an instruction. The new logic still prioritizes older instructions over younger instructions to minimize the pressure on the reorder buffer. However, the number of users of an instruction now also affects the overall rank. This potentially increases the ability of the Scheduler to extract instruction level parallelism. This patch fixes the problem with the wrong IPC reported for test add-sequence.s and test dependent-pmuld-paddd.s. llvm-svn: 336420
* CallGraphSCCPass: iterate over all functions.Tim Northover2018-07-063-49/+92
| | | | | | | | | | | | | | | Previously we only iterated over functions reachable from the set of external functions in the module. But since some of the passes under this (notably the always-inliner and coroutine lowerer) are required for correctness, they need to run over everything. This just adds an extra layer of iteration over the CallGraph to keep track of which functions we've already visited and get the next batch of SCCs. Should fix PR38029. llvm-svn: 336419
* [AArch64][ARM] Armv8.4-A: Trace synchronization barrier instructionSjoerd Meijer2018-07-0619-4/+248
| | | | | | | | This adds the Armv8.4-A Trace synchronization barrier (TSB) instruction. Differential Revision: https://reviews.llvm.org/D48918 llvm-svn: 336418
* [X86] Implement _builtin_ia32_vfmaddss and _builtin_ia32_vfmaddsd with ↵Craig Topper2018-07-062-8/+50
| | | | | | | | native IR using llvm.fma intrinsic. This generates some extra zeroing currently, but we should be able to quickly address that with some isel patterns. llvm-svn: 336417
* [X86] Remove FMA4 scalar intrinsics. Use llvm.fma intrinsic instead.Craig Topper2018-07-0610-80/+105
| | | | | | | | The intrinsics can be implemented with a f32/f64 llvm.fma intrinsic and an insert into a zero vector. There are a couple regressions here due to SelectionDAG not being able to pull an fneg through an extract_vector_elt. I'm not super worried about this though as InstCombine should be able to do it before we get to SelectionDAG. llvm-svn: 336416
* [ms] Fix mangling of string literals used to initialize arrays larger or ↵Hans Wennborg2018-07-062-21/+33
| | | | | | | | | | | | | | | | | | | | | | | | smaller than the literal A Chromium developer reported a bug which turned out to be a mangling collision between these two literals: char s[] = "foo"; char t[32] = "foo"; They may look the same, but for the initialization of t we will (under some circumstances) use a literal that's extended with zeros, and both the length and those zeros should be accounted for by the mangling. This actually makes the mangling code simpler: where it previously had special logic for null terminators, which are not part of the StringLiteral, that is now covered by the general algorithm. (The problem was reported at https://crbug.com/857442) Differential Revision: https://reviews.llvm.org/D48928 llvm-svn: 336415
* [ELF][MIPS] Simplify `checkFlags` routine and inline `rejectMicroMips64`. NFCSimon Atanasyan2018-07-061-9/+6
| | | | llvm-svn: 336414
* [ELF][MIPS] Remove support for linking microMIPS 64-bit codeSimon Atanasyan2018-07-066-112/+33
| | | | | | | | | Remove support for linking microMIPS 64-bit code because this kind of ISA is rarely used and unsupported by LLVM. Differential revision: https://reviews.llvm.org/D48949 llvm-svn: 336413
* [Support] Make support types more easily printable.Sam McCall2018-07-065-20/+95
| | | | | | | | | | | | | | | Summary: Error's new operator<< is the first way to print an error without consuming it. formatv() can now print objects with an operator<< that works with raw_ostream. Reviewers: bkramer Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D48966 llvm-svn: 336412
* Reapply: "objdump: Support newer ObjC image info flags"Dave Lee2018-07-062-0/+13
| | | | | | | | | | | | | | | | | | | | | Summary: Add support for two additional ObjC image info flags: `IS_SIMULATED` and `HAS_CATEGORY_CLASS_PROPERTIES`. `IS_SIMULATED` indicates a Mach-O binary built for iOS simulator. `HAS_CATEGORY_CLASS_PROPERTIES` indicates a Mach-O binary built by a compiler that supports class properties in categories. Reviewers: enderby, compnerd Reviewed By: compnerd Subscribers: keith, llvm-commits Differential Revision: https://reviews.llvm.org/D48568 llvm-svn: 336411
* Revert "[InstCombine] Delay foldICmpUsingKnownBits until simple transforms ↵Max Kazantsev2018-07-067-32/+38
| | | | | | are done" llvm-svn: 336410
* [X86] Remove all of the avx512 masked packed fma intrinsics. Use llvm.fma or ↵Craig Topper2018-07-067-784/+2097
| | | | | | | | | | unmasked 512-bit intrinsics with rounding mode. This upgrades all of the intrinsics to use fneg instructions to convert fma into fmsub/fnmsub/fnmadd/fmsubadd. And uses a select instruction for masking. This matches how clang uses the intrinsics these days. llvm-svn: 336409
* [X86] Cleanup some of the avx512 masked fma tests to prepare for removing ↵Craig Topper2018-07-063-1217/+1099
| | | | | | | | | | and autoupgrading. -Split cases that call 2 intrinsics in the same case. -Remove testing mask3 and maskz intrinsics with an all ones mask. These won't be interesting after the upgrade. -Restore test cases for some intrinsics that are marked for deletion, but haven't been deleted yet. llvm-svn: 336408
* [llvm-pdbutil] Dump more info about globals.Zachary Turner2018-07-065-16/+79
| | | | | | | | | | | | | | | We add an option to dump the entire global / public symbol record stream. Previously we would dump globals or publics, but not both. And when we did dump them, we would always dump them in the order they were referenced by the corresponding hash streams, not in the order they were serialized in. This patch adds a lower level mode that just dumps the whole stream in serialization order. Additionally, when dumping global-extras, we now dump the hash bitmap as well as the record offset instead of dumping all zeros for the offsets. llvm-svn: 336407
* [Power9] Add __float128 library call for fremStefan Pintilie2018-07-062-0/+16
| | | | | | | | Power 9 does not have a hardware instruction for frem but we can call fmodf128. Differential Revision: https://reviews.llvm.org/D48552 llvm-svn: 336406
* [PDB] Sort globals symbols by name in GSI hash buckets.Zachary Turner2018-07-067-5/+112
| | | | | | | | | | | It seems like the debugger first computes a symbol's bucket, and then does a binary search of entries in the bucket using the symbol's name in order to find it. If the bucket entries are not in sorted order, this obviously won't work. After this patch a couple of simple test cases show that we generate an exactly identical GSI hash stream, which is very nice. llvm-svn: 336405
* [x86]Add a test case to show missed vfnmadd generation.Easwaran Raman2018-07-061-0/+25
| | | | llvm-svn: 336404
* Remove a bunch more references to _LIBCPP_INLINE_VISIBILITYJim Ingham2018-07-068-40/+18
| | | | | | | | and adjust the tests that needed it to set their breakpoints more robustly. <rdar://problem/41867390> llvm-svn: 336403
* Revert "objdump: Support newer ObjC image info flags"Dave Lee2018-07-062-13/+0
| | | | | | This reverts commit 8c4cc472e7a67bd3b2b20cc4cf32d31af29bc7e9. llvm-svn: 336402
OpenPOWER on IntegriCloud