summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [SystemZ] Add support for new cpu architecture - arch13Ulrich Weigand2019-07-1219-37/+2585
| | | | | | | | | | | | | | | | | | This patch series adds support for the next-generation arch13 CPU architecture to the SystemZ backend. This includes: - Basic support for the new processor and its features. - Assembler/disassembler support for new instructions. - CodeGen for new instructions, including new LLVM intrinsics. - Scheduler description for the new processor. - Detection of arch13 as host processor. Note: No currently available Z system supports the arch13 architecture. Once new systems become available, the official system name will be added as supported -march name. llvm-svn: 365932
* Remove unused methods in Sancov.Leonard Chan2019-07-121-27/+6
| | | | llvm-svn: 365931
* [X86] Add NEG to isUseDefConvertible.Craig Topper2019-07-121-0/+5
| | | | | | | | | | | | | We can use the C flag from NEG to detect that the input was zero. Really we could probably use the Z flag too. But C matches what we'd do for usubo 0, X. Haven't found a test case for this due to the usubo formation in CGP. But I verified if I comment out the CGP code this transformation catches some of the same cases. llvm-svn: 365929
* [Attributor] Removing unnecessary `virtual` keywords.Stefan Stipanovic2019-07-121-12/+12
| | | | | | | | | | | | | Some function in the Attributor framework are unnecessarily marked virtual. This patch removes virtual keyword Reviewers: jdoerfert Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D64637 llvm-svn: 365925
* [Attributor] Deduce "nofree" function attributeHideto Ueno2019-07-121-0/+70
| | | | | | | | | | | | | | | | Summary: Deduce "nofree" function attribute. A more concise description of "nofree" is on D49165. Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: homerdin, hfinkel, lebedev.ri, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62687 llvm-svn: 365924
* [IndVars] Use exit count reasoning to discharge obviously untaken exitsPhilip Reames2019-07-121-17/+110
| | | | | | | | | | Continue in the spirit of D63618, and use exit count reasoning to prove away loop exits which can not be taken since the backedge taken count of the loop as a whole is provably less than the minimal BE count required to take this particular loop exit. As demonstrated in the newly added tests, this triggers in a number of cases where IndVars was previously unable to discharge obviously redundant exit tests. And some not so obvious ones. Differential Revision: https://reviews.llvm.org/D63733 llvm-svn: 365920
* [Support] Move the static initializer install_out_memory_new_handler to InitLLVMFangrui Song2019-07-122-17/+6
| | | | | | | | | | | An application linking against LLVMSupport should not get the gratuitous set::std_new_handler call. Reviewed By: jfb Differential Revision: https://reviews.llvm.org/D64505 llvm-svn: 365915
* Add missing <atomic> include to appease MSVC builds.Simon Pilgrim2019-07-121-0/+1
| | | | llvm-svn: 365914
* Support for dumping current PrettyStackTrace on SIGINFO (Ctrl-T)Jordan Rose2019-07-123-17/+119
| | | | | | | | | | | | | | | | | | | | Support SIGINFO (and SIGUSR1 for POSIX purposes) to tell what long-running jobs are doing, as inspired by BSD tools (including on macOS), by dumping the current PrettyStackTrace. This adds a new kind of signal handler for non-fatal "info" signals, similar to the "interrupt" handler that already exists for SIGINT (Ctrl-C). It then uses that handler to update a "generation count" managed by the PrettyStackTrace infrastructure, which is then checked whenever a PrettyStackTraceEntry is pushed or popped on each thread. If the generation has changed---i.e. if the user has pressed Ctrl-T---the stack trace is dumped, though unfortunately it can't include the deepest entry because that one is currently being constructed/destructed. https://reviews.llvm.org/D63750 llvm-svn: 365911
* [AMDGPU] Fix DPP combiner check for exec modificationJay Foad2019-07-124-29/+63
| | | | | | | | | | | | | | | | | | | | | | | | Summary: r363675 changed the exec modification helper function, now called execMayBeModifiedBeforeUse, so that if no UseMI is specified it checks all instructions in the basic block, even beyond the last use. That meant that the DPP combiner no longer worked in any basic block that ended with a control flow instruction, and in particular it didn't work on code sequences generated by the atomic optimizer. Fix it by reinstating the old behaviour but in a new helper function execMayBeModifiedBeforeAnyUse, and limiting the number of instructions scanned. Reviewers: arsenm, vpykhtin Subscribers: kzhuravl, nemanjai, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kbarton, MaskRay, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64393 llvm-svn: 365910
* [LegacyPassManager] Small ModuleCount cleanupFangrui Song2019-07-121-5/+3
| | | | llvm-svn: 365907
* [AMDGPU] Restrict v_cndmask_b32 abs/neg modifiers to f32Jay Foad2019-07-123-2/+14
| | | | | | | | | | | | | | | | | | Summary: D64497 allowed abs/neg source modifiers on v_cndmask_b32 but it doesn't make any sense to apply them to f16 operands; they would interpret the bits of the value as an f32, giving nonsensical results. This patch restricts them to f32 operands. Reviewers: arsenm, hakzsam Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64636 llvm-svn: 365904
* Delete dead storesFangrui Song2019-07-1217-58/+27
| | | | llvm-svn: 365903
* [DAGCombine] narrowExtractedVectorBinOp - wrap subvector extraction in ↵Simon Pilgrim2019-07-121-9/+11
| | | | | | | | helper. NFCI. First step towards supporting 'free' subvector extractions other than concat_vectors. llvm-svn: 365896
* [InstCombine] Fold select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y) to ashr ↵David Bolvansky2019-07-121-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (X, Y)) Summary: (select (icmp sgt x, -1), lshr (X, Y), ashr (X, Y)) -> ashr (X, Y)) (select (icmp slt x, 1), ashr (X, Y), lshr (X, Y)) -> ashr (X, Y)) Fixes PR41173 Alive proof by @lebedev.ri (thanks) Name: PR41173 %cmp = icmp slt i32 %x, 1 %shr = lshr i32 %x, %y %shr1 = ashr i32 %x, %y %retval.0 = select i1 %cmp, i32 %shr1, i32 %shr => %retval.0 = ashr i32 %x, %y Optimization: PR41173 Done: 1 Optimization is correct! Reviewers: lebedev.ri, spatel Reviewed By: lebedev.ri Subscribers: nikic, craig.topper, llvm-commits, lebedev.ri Tags: #llvm Differential Revision: https://reviews.llvm.org/D64285 llvm-svn: 365893
* Revert "[DwarfDebug] Dump call site debug info"Djordje Todorovic2019-07-1214-498/+45
| | | | | | | | A build failure was found on the SystemZ platform. This reverts commit 9e7e73578e54cd22b3c7af4b54274d743b6607cc. llvm-svn: 365886
* [RISCV] Allow parsing dot '.' in assemblySam Elliott2019-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | | Summary: Useful for jumps, such as `j .`. I am not sure who should review this. Do not hesitate to change the reviewers if needed. Reviewers: asb, jrtc27, lenary Reviewed By: lenary Subscribers: MaskRay, lenary, hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63669 Patch by John LLVM (JohnLLVM) llvm-svn: 365881
* Test commit. NFC.Bryant Wong2019-07-121-0/+1
| | | | | | Formatting fix. llvm-svn: 365878
* [mips] Fix JmpLink to texternalsym and tglobaladdr on mcroMIPS R6Simon Atanasyan2019-07-122-1/+14
| | | | | | | | | | | | | | | | There is not match for the `MipsJmpLink texternalsym` and `MipsJmpLink tglobaladdr` patterns for microMIPS R6. As a result LLVM incorrectly selects the `JALRC16` compact 2-byte instruction which takes a target instruction address from a register only and assign `R_MIPS_32` relocation for this instruction. This relocation completely overwrites `JALRC16` and nearby instructions. This patch adds missed matching patterns, selects `BALC` instruction and assign a correct `R_MICROMIPS_PC26_S1` relocation. Differential Revision: https://reviews.llvm.org/D64552 llvm-svn: 365870
* [YAMLIO] Remove trailing spaces when outputting mapsFangrui Song2019-07-121-11/+23
| | | | | | | | | | | | | | | | | | llvm::yaml::Output::paddedKey unconditionally outputs spaces, which are superfluous if the value to be dumped is a sequence or map. Change `bool NeedsNewLine` to `StringRef Padding` so that it can be overridden to `\n` if the value is a sequence or map. An empty map/sequence is special. It is printed as `{}` or `[]` without a newline, while a non-empty map/sequence follows a newline. To handle this distinction, add another variable `PaddingBeforeContainer` and does the special handling in endMapping/endSequence. Reviewed By: grimar, jhenderson Differential Revision: https://reviews.llvm.org/D64566 llvm-svn: 365869
* Return Undef from isBytewiseValue for empty arrays or structsVitaly Buka2019-07-121-0/+4
| | | | | | | | | | | | Reviewers: pcc, eugenis Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64052 llvm-svn: 365864
* [MachinePipeliner] Fix order for nodes with Anti dependence in same cycleJinsong Ji2019-07-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Problem exposed in PowerPC functional testing. We did not consider Anti dependence for nodes in same cycle, so we may end up generating bad machine code. eg: the reduced test won't verify. *** Bad machine code: Using an undefined physical register *** - function: lame_encode_buffer_interleaved - basic block: %bb.4 (0x4bde4e12928) - instruction: %29:gprc = ADDZE %27:gprc, implicit-def dead $carry, implicit $carry - operand 3: implicit $carry Reviewers: bcahoon, kparzysz, hfinkel Subscribers: MaskRay, wuzish, nemanjai, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64192 llvm-svn: 365859
* Handle IntToPtr in isBytewiseValueVitaly Buka2019-07-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This helps with more efficient use of memset for pattern initialization From @pcc prototype for -ftrivial-auto-var-init=pattern optimizations Binary size change on CTMark, (with -fuse-ld=lld -Wl,--icf=all, similar results with default linker options) ``` master patch diff Os 8.238864e+05 8.238864e+05 0.0 O3 1.054797e+06 1.054797e+06 0.0 Os zero 8.292384e+05 8.292384e+05 0.0 O3 zero 1.062626e+06 1.062626e+06 0.0 Os pattern 8.579712e+05 8.338048e+05 -0.030299 O3 pattern 1.090502e+06 1.067574e+06 -0.020481 ``` Zero vs Pattern on master ``` zero pattern diff Os 8.292384e+05 8.579712e+05 0.036578 O3 1.062626e+06 1.090502e+06 0.025124 ``` Zero vs Pattern with the patch ``` zero pattern diff Os 8.292384e+05 8.338048e+05 0.003333 O3 1.062626e+06 1.067574e+06 0.003193 ``` Reviewers: pcc, eugenis Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D63967 llvm-svn: 365858
* [InstCombine] Reorder pow() transformations (NFC)Evandro Menezes2019-07-121-23/+19
| | | | | | | Move the transformation from `powf(x, itofp(y))` to `powi(x, y)` to the group of transformations related to the exponent. llvm-svn: 365851
* [AMDGPU] Skip calculating callee saved registers for entry function.Michael Liao2019-07-111-1/+5
| | | | | | | | | | | | Reviewers: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64596 llvm-svn: 365846
* AMDGPU: s_waitcnt field should be treated as unsignedMatt Arsenault2019-07-112-3/+7
| | | | | | | Also make it an ImmLeaf, so it should work with global isel as well, which was part of the point of moving it in the first place. llvm-svn: 365842
* [NewPM] Port SancovLeonard Chan2019-07-114-111/+262
| | | | | | | | | | | | | | | | | This patch contains a port of SanitizerCoverage to the new pass manager. This one's a bit hefty. Changes: - Split SanitizerCoverageModule into 2 SanitizerCoverage for passing over functions and ModuleSanitizerCoverage for passing over modules. - ModuleSanitizerCoverage exists for adding 2 module level calls to initialization functions but only if there's a function that was instrumented by sancov. - Added legacy and new PM wrapper classes that own instances of the 2 new classes. - Update llvm tests and add clang tests. Differential Revision: https://reviews.llvm.org/D62888 llvm-svn: 365838
* [AMDGPU] Fixed asan error with agpr spillingStanislav Mekhanoshin2019-07-111-1/+4
| | | | | | Instruction was used after it was erased. llvm-svn: 365837
* Fix build errors LLVM tests are disabled.Diego Novillo2019-07-111-1/+3
| | | | | | | | | | | | | | | | | | Original patch from alanbaker@google.com Fixes the error: CMake Error in <...>/llvm/cmake/modules/CMakeLists.txt: export called with target "LLVMTestingSupport" which requires target "gtest" that is not in the export set. This occurs when LLVM is embedded in a larger project, but is configured not to include tests. If testing is disabled gtest isn't available and LLVM fails to configure. Differential revision: https://reviews.llvm.org/D63097 llvm-svn: 365836
* [AMDGPU] gfx908 agpr spillingStanislav Mekhanoshin2019-07-117-45/+367
| | | | | | Differential Revision: https://reviews.llvm.org/D64594 llvm-svn: 365833
* [Attributor] Deduce "nosync" function attribute.Stefan Stipanovic2019-07-119-1/+209
| | | | | | | | | | | | | | Introduce and deduce "nosync" function attribute to indicate that a function does not synchronize with another thread in a way that other thread might free memory. Reviewers: jdoerfert, jfb, nhaehnle, arsenm Subscribers: wdng, hfinkel, nhaenhle, mehdi_amini, steven_wu, dexonsmith, arsenm, uenoku, hiraditya, jfb, llvm-commits Differential Revision: https://reviews.llvm.org/D62766 llvm-svn: 365830
* [AMDGPU] gfx908 hazard recognizerStanislav Mekhanoshin2019-07-112-1/+233
| | | | | | Differential Revision: https://reviews.llvm.org/D64593 llvm-svn: 365829
* [AMDGPU] gfx908 schedulingStanislav Mekhanoshin2019-07-113-0/+163
| | | | | | Differential Revision: https://reviews.llvm.org/D64590 llvm-svn: 365826
* [AMDGPU] gfx908 mfma supportStanislav Mekhanoshin2019-07-1116-62/+548
| | | | | | Differential Revision: https://reviews.llvm.org/D64584 llvm-svn: 365824
* Open native file handles to avoid converting from FDs, NFCReid Kleckner2019-07-115-36/+37
| | | | | | Follow up to r365588. llvm-svn: 365820
* [WebAssembly] Assembler: support negative float constants.Wouter van Oortmerssen2019-07-111-12/+27
| | | | | | | | | | | | Reviewers: dschuff Subscribers: sbc100, jgravelle-google, aheejin, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64367 llvm-svn: 365802
* [NVPTX] Use atomicrmw fadd instead of intrinsicsBenjamin Kramer2019-07-114-21/+20
| | | | | | AutoUpgrade the old intrinsics to atomicrmw fadd. llvm-svn: 365796
* [X86] Merge negated ISD::SUB nodes into X86ISD::SUB equivalent (PR40483)Sanjay Patel2019-07-111-7/+7
| | | | | | | | | | | Follow up to D58597, where it was noted that the commuted ISD::SUB variant was having problems with lack of combines. See also D63958 where we untangled setcc/sub pairs. Differential Revision: https://reviews.llvm.org/D58875 llvm-svn: 365791
* Fix a few 'no newline at end of file' warnings that Xcode emitsNico Weber2019-07-111-1/+1
| | | | | | | (Xcode even has a snazzy "Fix" button, but clicking that inserts two newlines. So close!) llvm-svn: 365789
* [DAGCombine] narrowInsertExtractVectorBinOp - add CONCAT_VECTORS supportSimon Pilgrim2019-07-111-4/+14
| | | | | | | | | | | | | | We already split extract_subvector(binop(insert_subvector(v,x),insert_subvector(w,y))) -> binop(x,y). This patch adds support for extract_subvector(binop(concat_vectors(),concat_vectors())) cases as well. In particular this means we don't have to wait for X86 lowering to convert concat_vectors to insert_subvector chains, which helps avoid some cases where demandedelts/combine calls occur too late to split large vector ops. The fast-isel-store.ll load folding regression is annoying but I don't think is that critical. Differential Revision: https://reviews.llvm.org/D63653 llvm-svn: 365785
* RegUsageInfoCollector: Skip calling conventions I missed beforeMatt Arsenault2019-07-111-0/+3
| | | | llvm-svn: 365784
* AMDGPU/GlobalISel: Move kernel argument handling to separate functionMatt Arsenault2019-07-112-42/+61
| | | | llvm-svn: 365782
* GlobalISel: Use RegisterMatt Arsenault2019-07-111-5/+5
| | | | llvm-svn: 365780
* [InstCombine] don't move FP negation out of a constant expressionSanjay Patel2019-07-111-2/+4
| | | | | | | -(X * ConstExpr) becomes X * (-ConstExpr), so don't reverse that and infinite loop. llvm-svn: 365774
* OpaquePtr: switch to GlobalValue::getValueType in a few places. NFC.Tim Northover2019-07-113-8/+5
| | | | llvm-svn: 365770
* OpaquePtr: use byval accessor instead of inspecting pointer type. NFC.Tim Northover2019-07-111-3/+2
| | | | | | | The accessor can deal with both "byval(ty)" and "ty* byval" forms seamlessly. llvm-svn: 365769
* OpaquePtr: use load instruction directly for type. NFC.Tim Northover2019-07-111-2/+1
| | | | llvm-svn: 365768
* InstructionSimplify: Simplify InstructionSimplify. NFC.Tim Northover2019-07-111-42/+24
| | | | | | | | | | | The interface predates CallBase, so both it and implementation were significantly more complicated than they needed to be. There was even some redundancy that could be eliminated. Should also help with OpaquePointers by not trying to derive a function's type from it's PointerType. llvm-svn: 365767
* [yaml2obj] - Allow overriding the sh_size field.George Rimar2019-07-111-4/+6
| | | | | | | | | | There is no way to set broken sh_size field currently for sections. It can be usefull for writing the test cases. Differential revision: https://reviews.llvm.org/D64401 llvm-svn: 365766
* [InstCombine] Reorder recently added/improved pow transformationsDavid Bolvansky2019-07-111-3/+3
| | | | | | Changed cases are now faster with exp2. llvm-svn: 365758
OpenPOWER on IntegriCloud