summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [SLP] Look-ahead operand reordering heuristic.Vasileios Porpodas2019-06-262-93/+323
| | | | | | | | | | | | | | | | Summary: This patch introduces a new heuristic for guiding operand reordering. The new "look-ahead" heuristic can look beyond the immediate predecessors. This helps break ties when the immediate predecessors have identical opcodes (see lit test for an example). Reviewers: RKSimon, ABataev, dtemirbulatov, Ayal, hfinkel, rnk Reviewed By: RKSimon, dtemirbulatov Subscribers: rnk, rcorcs, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60897 llvm-svn: 364478
* [InstCombine] change 'tmp' variable names; NFCSanjay Patel2019-06-261-86/+86
| | | | | | | | | | | I don't think there was anything going wrong here, but the auto-generating CHECK line script is known to have problems with 'TMP' because it uses that to match nameless values. This is a retry of rL364452. llvm-svn: 364477
* Revert r363191 "[MS] Pretend constexpr variable template specializations are ↵Reid Kleckner2019-06-262-30/+4
| | | | | | | | | inline" The next Visual Studio update will fix this issue, and it doesn't make sense to implement this non-conforming behavior going forward. llvm-svn: 364476
* [clang-scan-deps] Introduce the DependencyScanning library with theAlex Lorenz2019-06-2610-116/+286
| | | | | | | | | | | | | thread worker code and better error handling This commit extracts out the code that will powers the fast scanning worker into a new file in a new DependencyScanning library. The error and output handling is improved so that the clients can gather errors/results from the worker directly. Differential Revision: https://reviews.llvm.org/D63681 llvm-svn: 364474
* AMDGPU: Assert SPAdj is 0Matt Arsenault2019-06-261-0/+2
| | | | llvm-svn: 364473
* PEI: Add default handling of spills to registersMatt Arsenault2019-06-261-9/+22
| | | | llvm-svn: 364472
* [UpdateTestChecks][NFC] Remove entries with same prefixJinsong Ji2019-06-261-2/+0
| | | | | | | | Matching is 'lossy', triples with same prefix can be dropped. Differential Revision: https://reviews.llvm.org/D63732 llvm-svn: 364471
* [AMDGPU] Fix Livereg computation during epilogue insertionMatt Arsenault2019-06-262-1/+3
| | | | | | | | | | | | The LivePhysRegs calculated in order to find a scratch register in the epilogue code wrongly uses 'LiveIns'. Instead, it should use the 'Liveout' sets. For the liveness, also considering the operands of the terminator (return) instruction which is the insertion point for the scratch-exec-copy instruction. Patch by Christudasan Devadasan llvm-svn: 364470
* [X86] Rework the logic in LowerBuildVectorv16i8 to make better use of ↵Craig Topper2019-06-265-52/+49
| | | | | | | | | | | | any_extend and break false dependencies. Other improvements This patch rewrites the loop iteration to only visit every other element starting with element 0. And we work on the "even" element and "next" element at the same time. The "First" logic has been moved to the bottom of the loop and doesn't run on every element. I believe it could create dangling nodes previously since we didn't check if we were going to use SCALAR_TO_VECTOR for the first insertion. I got rid of the "First" variable and just do a null check on V which should be equivalent. We also no longer use undef as the starting V for vectors with no zeroes to avoid false dependencies. This matches v8i16. I've changed all the extends and OR operations to use MVT::i32 since that's what they'll be promoted to anyway. I've tried to use zero_extend only when necessary and use any_extend otherwise. This resulted in some improvements in tests where we are now able to promote aligned (i32 (extload i8)) to a 32-bit load. Differential Revision: https://reviews.llvm.org/D63702 llvm-svn: 364469
* [WebAssembly] Implement Address Sanitizer for EmscriptenGuanzhong Chen2019-06-263-1/+9
| | | | | | | | | | | | | | | | | | | | | | Summary: This diff enables address sanitizer on Emscripten. On Emscripten, real memory starts at the value passed to --global-base. All memory before this is used as shadow memory, and thus the shadow mapping function is simply dividing by 8. Reviewers: tlively, aheejin, sbc100 Reviewed By: sbc100 Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63742 llvm-svn: 364468
* [wasm-ld] Add __global_base symbol to mark the value of --global-baseGuanzhong Chen2019-06-265-0/+80
| | | | | | | | | | | | | | | | | | | | | | Summary: This is needed for address sanitizer on Emscripten. As everything in memory starts at the value passed to --global-base, everything before that can be used as shadow memory. This symbol is added so that the library for the ASan runtime can know where the shadow memory ends and real memory begins. This is split from D63742. Reviewers: tlively, aheejin, sbc100 Subscribers: sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63833 llvm-svn: 364467
* Make nrvo-string test more robust.Adrian Prantl2019-06-261-2/+5
| | | | | | | | | | | | | The breakpoint locations were in places where clang doesn't actually emit a source location for and depend on the debugger's ability to move the breakpoint forward onto a line that is already in the function epilogue. In my testing older versions of LLDB fail to do that, so I'm modifying the test to force a break-able location by calling a noinline function. <rdar://problem/52079841> llvm-svn: 364466
* [x86-64] Use `//` for integer division in the target definition.Davide Italiano2019-06-261-1/+1
| | | | | | | | This forces integer division and works with python 2 and python 3. <rdar://problem/52073911> llvm-svn: 364465
* BitStream reader: propagate errorsJF Bastien2019-06-2632-758/+1908
| | | | | | | | | | | | | | | | | | | | | | The bitstream reader handles errors poorly. This has two effects: * Bugs in file handling (especially modules) manifest as an "unexpected end of file" crash * Users of clang as a library end up aborting because the code unconditionally calls `report_fatal_error` The bitstream reader should be more resilient and return Expected / Error as soon as an error is encountered, not way late like it does now. This patch starts doing so and adopting the error handling where I think it makes sense. There's plenty more to do: this patch propagates errors to be minimally useful, and follow-ups will propagate them further and improve diagnostics. https://bugs.llvm.org/show_bug.cgi?id=42311 <rdar://problem/33159405> Differential Revision: https://reviews.llvm.org/D63518 llvm-svn: 364464
* [X86] Remove isTypePromotionOfi1ZeroUpBits and its helpers.Craig Topper2019-06-261-71/+0
| | | | | | | | | This was trying to optimize concat_vectors with zero of setcc or kand instructions. But I think it produced the same code we produce for a concat_vectors with 0 even it it doesn't come from one of those operations. llvm-svn: 364463
* Print NULL as "(null)" in diagnostic messageXing Xue2019-06-261-4/+6
| | | | | | | | | | | | | | | | | | | Summary: Passing a null pointer to the printf family for a %s format specifier leads to undefined behaviour. The tests currently expect (null). Explicitly test for a null pointer and provide the expected string. Authored By: andusy Reviewers: hubert.reinterpretcast, xingxue, jasonliu, daltenty, cebowleratibm Reviewed By: hubert.reinterpretcast Subscribers: arphaman, jsji, cfe-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63786 llvm-svn: 364462
* Fix some undefined behavior (excessive shift of signed value) in r364253 ↵David Blaikie2019-06-261-1/+1
| | | | | | detected by ubsan llvm-svn: 364461
* llvm-objcopy: silence warning introduced in r364296Nicolai Haehnle2019-06-262-2/+6
| | | | | Change-Id: I306e866d497e55945fb3b471eb0727b63ad9e4b9 llvm-svn: 364460
* Fix Wdocumentation warnings. NFCI.Simon Pilgrim2019-06-261-1/+3
| | | | llvm-svn: 364459
* [X86][SSE] getFauxShuffleMask - handle OR(x,y) where x and y have no ↵Simon Pilgrim2019-06-262-56/+42
| | | | | | | | | | overlapping bits Create a per-byte shuffle mask based on the computeKnownBits from each operand - if for each byte we have a known zero (or both) then it can be safely blended. Fixes PR41545 llvm-svn: 364458
* [Reproducers] Copy over access/modification time in the FileCollector.Jonas Devlieghere2019-06-261-0/+31
| | | | | | | | Copy over access and modification time for the files included in the reproducer. This is needed to pass tests that check the integrity of object files based on their time stamp. llvm-svn: 364457
* Fixed memory use-after-free problem.Andrey Churbanov2019-06-262-3/+24
| | | | | | | | | | | Bug reported in https://bugs.llvm.org/show_bug.cgi?id=42269. Freeing of the contention group (CG) stucture by master thread looks wrong, because workers can leave the CG later on. Intead the freeing is now done by the last thread leaving the CG. Differential Revision: https://reviews.llvm.org/D63599 llvm-svn: 364456
* Revert [InstCombine] change 'tmp' variable names; NFCSanjay Patel2019-06-261-84/+86
| | | | | | This reverts r364452 (git commit 6083ae0b4a250c69f6d5b13b3742ee1fe5b878d5) llvm-svn: 364455
* [X86][AVX] Add reduced test case for PR41545Simon Pilgrim2019-06-261-0/+76
| | | | llvm-svn: 364454
* Make AddLastArg() variadic and use it more. No behavior change.Nico Weber2019-06-263-46/+21
| | | | llvm-svn: 364453
* [InstCombine] change 'tmp' variable names; NFCSanjay Patel2019-06-261-86/+84
| | | | | | | | | I don't think there was anything going wrong here, but the auto-generating CHECK line script is known to have problems with 'TMP' because it uses that to match nameless values. llvm-svn: 364452
* [AMDGPU] Fix for branch offset hardware workaroundRyan Taylor2019-06-2610-24/+381
| | | | | | | | | | | | | | | | | | | Summary: This fixes a hardware bug that makes a branch offset of 0x3f unsafe. This replaces the 32 bit branch with offset 0x3f to a 64 bit instruction that includes the same 32 bit branch and the encoding for a s_nop 0 to follow. The relaxer than modifies the offsets accordingly. Change-Id: I10b7aed99d651f8159401b01bb421f105fa6288e Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63494 llvm-svn: 364451
* Allow matching extend-from-memory with strict FP nodesUlrich Weigand2019-06-266-55/+227
| | | | | | | | | | | | | | | | | | | | | This implements a small enhancement to https://reviews.llvm.org/D55506 Specifically, while we were able to match strict FP nodes for floating-point extend operations with a register as source, this did not work for operations with memory as source. That is because from regular operations, this is represented as a combined "extload" node (which is a variant of a load SD node); but there is no equivalent using a strict FP operation. However, it turns out that even in the absence of an extload node, we can still just match the operations explicitly, e.g. (strict_fpextend (f32 (load node:$ptr)) This patch implements that method to match the LDEB/LXEB/LXDB SystemZ instructions even when the extend uses a strict-FP node. llvm-svn: 364450
* [IndVars] Kill a redundant bit of debug outputPhilip Reames2019-06-261-2/+0
| | | | llvm-svn: 364449
* Fix builbots after r364427.Greg Clayton2019-06-261-1/+1
| | | | | | I was using an iterator that was equal to the end of a collection. llvm-svn: 364447
* [WebAssembly] Omit wrap on i64x2.{shl,shr*} ISel when possibleThomas Lively2019-06-262-11/+56
| | | | | | | | | | | | | | | | | | Summary: Since the WebAssembly SIMD shift instructions take i32 operands, we truncate the i64 operand to <2 x i64> shifts during ISel. When the i64 operand is sign extended from i32, this CL makes it so the sign extension is dropped instead of a wrap instruction added. Reviewers: dschuff, aheejin Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63615 llvm-svn: 364446
* [WebAssembly] Implement tail calls and unify tablegen call classesThomas Lively2019-06-2614-170/+371
| | | | | | | | | | | | | | | | | Summary: Implements direct and indirect tail calls enabled by the 'tail-call' feature in both DAG ISel and FastISel. Updates existing call tests and adds new tests including a binary encoding test. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62877 llvm-svn: 364445
* Fix leaks in LLVMCreateDisasmCPUFeaturesScott Linder2019-06-262-31/+31
| | | | | | Differential Revision: https://reviews.llvm.org/D63795 llvm-svn: 364444
* [dotest] Add the ability to set environment variables for the inferior.Jonas Devlieghere2019-06-264-0/+15
| | | | | | | | | | | This patch adds a dotest flag for setting environment variables for the inferior. This is different from the current --env flag, which sets variables in the debugger's environment. This allows us to set things like LD_LIBRARY_PATH for testing. Differential revision: https://reviews.llvm.org/D63790 llvm-svn: 364443
* [clang-tidy] Generalize TransformerClangTidyCheck to take a rule generator.Yitzhak Mandelbaum2019-06-263-15/+105
| | | | | | | | | | | | | | Summary: Tidy check behavior often depends on language and/or clang-tidy options. This revision allows a user of TranformerClangTidyCheck to pass rule _generator_ in place of a rule, where the generator takes both the language and clang-tidy options. Additionally, the generator returns an `Optional` to allow for the case where the check is deemed irrelevant/disable based on those options. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63288 llvm-svn: 364442
* [InstCombine] simplify code for inserts -> splat; NFCSanjay Patel2019-06-261-25/+17
| | | | llvm-svn: 364441
* Fix build in shared lib mode.Michael Liao2019-06-262-1/+22
| | | | | | | - The newly added GSYM misses LLVMBuild.txt. Add a barely one to pass the build. llvm-svn: 364440
* [xray] Remove usage of procid_tAlexandre Ganea2019-06-262-12/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D61946 llvm-svn: 364439
* [LLD][COFF] Case insensitive compares for /nodefaultlibAlexandre Ganea2019-06-263-4/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D63775 llvm-svn: 364438
* [InstCombine] regenerate test checks; NFCSanjay Patel2019-06-261-37/+75
| | | | llvm-svn: 364437
* [CodeGen] Improve formatting of jump tables (NFC)Evandro Menezes2019-06-262-31/+33
| | | | | | Split jump tables into individual lines and fix spacing. llvm-svn: 364436
* [clang-tidy] Fix ClangTidyTest to initialize context before checks.Yitzhak Mandelbaum2019-06-261-21/+27
| | | | | | | | | | | | | | | | | | | | | Summary: Currently, `clang::tidy::test::runCheckOnCode()` constructs the check instances *before* initializing the ClangTidyContext. This ordering causes problems when the check's constructor accesses the context, for example, through `getLangOpts()`. This revision moves the construction to after the context initialization, which follows the pattern used in the clang tidy tool itself. Reviewers: gribozavr Subscribers: xazax.hun, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63784 llvm-svn: 364435
* [X86][SSE] X86TargetLowering::isCommutativeBinOp - add PMULDQSimon Pilgrim2019-06-261-3/+1
| | | | | | Allows narrowInsertExtractVectorBinOp to reduce vector size instead of the more restricted SimplifyDemandedVectorEltsForTargetNode llvm-svn: 364434
* [NFC][InstCombine] Revisit one-use tests in ↵Roman Lebedev2019-06-261-14/+114
| | | | | | shift-amount-reassociation-in-bittest.ll llvm-svn: 364433
* [X86][SSE] X86TargetLowering::isCommutativeBinOp - add PCMPEQSimon Pilgrim2019-06-269-1207/+1231
| | | | | | Allows narrowInsertExtractVectorBinOp to reduce vector size llvm-svn: 364432
* [X86][SSE] X86TargetLowering::isBinOp - add PCMPGTSimon Pilgrim2019-06-2615-318/+321
| | | | | | Allows narrowInsertExtractVectorBinOp to reduce vector size llvm-svn: 364431
* [NFC][InstCombine] Add shift amount reassociation in bittest tests (PR42399)Roman Lebedev2019-06-261-0/+420
| | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=42399 https://rise4fun.com/Alive/kBb https://rise4fun.com/Alive/1SB llvm-svn: 364430
* [X86] shouldScalarizeBinop - never scalarize target opcodes.Simon Pilgrim2019-06-261-2/+9
| | | | | | We have (almost) no target opcodes that have scalar/vector equivalents - for now assume we can't scalarize them (we can add exceptions if we need to). llvm-svn: 364429
* Make CodeGen depend on ASTMatchersMichael Liao2019-06-261-0/+1
| | | | | | - Shared library builds are broken due to the missing dependency. llvm-svn: 364428
* Add GSYM utility files along with unit tests.Greg Clayton2019-06-2614-0/+1047
| | | | | | | | | | | | | | | | | | | | | | | | The full GSYM patch started with: https://reviews.llvm.org/D53379 In that patch we wanted to split up getting GSYM into the LLVM code base so we are not committing too much code at once. This is a first in a series of patches where I only add the foundation classes along with complete unit tests. They provide the foundation for encoding and decoding a GSYM file. File entries are defined in llvm::gsym::FileEntry. This class splits the file up into a directory and filename represented by uniqued string table offsets. This allows all files that are referred to in a GSYM file to be encoded as 1 based indexes into a global file table in the GSYM file. Function information in stored in llvm::gsym::FunctionInfo. This object represents a contiguous address range that has a name and range with an optional line table and inline call stack information. Line table entries are defined in llvm::gsym::LineEntry. They store only address, file and line information to keep the line tables simple and allows the information to be efficiently encoded in a subsequent patch. Inline information is defined in llvm::gsym::InlineInfo. These structs store the name of the inline function, along with one or more address ranges, and the file and line that called this function. They also contain any child inline information. There are also utility classes for address ranges in llvm::gsym::AddressRange, and string table support in llvm::gsym::StringTable which are simple classes. The unit tests test all the APIs on these simple classes so they will be ready for the next patches where we will create GSYM files and parse GSYM files. Differential Revision: https://reviews.llvm.org/D63104 llvm-svn: 364427
OpenPOWER on IntegriCloud