summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Refactor the FP_TO_INTHelper interface. NFCICraig Topper2019-02-132-69/+38
| | | | | | | | -Pull the final stack load creation from the two callers into the helper. -Return a single SDValue instead of a std::pair. -Remove the Replace flag which isn't really needed. llvm-svn: 353920
* [LoopSimplifyCFG] Re-enable const branch folding by defaultMax Kazantsev2019-02-131-1/+1
| | | | | | | | Known underlying bugs have been fixed, intensive fuzz testing did not find any new problems. Re-enabling by default. Feel free to revert if it causes any functional failures. llvm-svn: 353911
* [MC] Make symbol version errors non-fatalReid Kleckner2019-02-131-6/+12
| | | | | | | | | We stil don't have a source location, which is pretty lame, but at least we won't tell the user to file a clang bug report anymore. Fixes PR40712 llvm-svn: 353907
* [MemorySSA & LoopPassManager] Add remaining book keeping [NFCI].Alina Sbirlea2019-02-122-3/+10
| | | | | | | | Add plumbing to get MemorySSA in the remaining loop passes. Also update unit test to add the dependency. [EnableMSSALoopDependency remains disabled]. llvm-svn: 353901
* AMDGPU: Try to use function specific STMatt Arsenault2019-02-122-21/+22
| | | | | | | | Subtargets are a function level property, so ideally we would eliminate everywhere that needs to check the global one. Rename the function to try avoiding confusion. llvm-svn: 353900
* AMDGPU: Ignore CodeObjectV3 when inliningMatt Arsenault2019-02-121-0/+1
| | | | | | | | | | This was inhibiting inlining of library functions when clang was invoking the inliner directly. This is covering a bit of a mess with subtarget feature handling, and this shouldn't be a subtarget feature. The behavior is different depending on whether you are using a -mattr flag in clang, or llc, opt. llvm-svn: 353899
* [SystemZ] Remember to cast value to void to disable warning.Jonas Paulsson2019-02-121-2/+2
| | | | | | Hopefully fixes buildbot problems. llvm-svn: 353898
* [LICM] Cap the clobbering calls in LICM.Alina Sbirlea2019-02-121-25/+38
| | | | | | | | | | | | | | | | | | | Summary: Unlimitted number of calls to getClobberingAccess can lead to high compile times in pathological cases. Switching EnableLicmCap flag from bool to int, and enabling to default 100. (tested to be appropriate for current bechmarks) We can revisit this value when enabling MemorySSA. Reviewers: sanjoy, chandlerc, george.burgess.iv Subscribers: jlebar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57968 llvm-svn: 353897
* AMDGPU/NFC: Remove SubtargetFeatureISAVersion since it is not used anywhereKonstantin Zhuravlyov2019-02-121-10/+0
| | | | llvm-svn: 353892
* AMDGPU: Remove duplicate processor (gfx900)Konstantin Zhuravlyov2019-02-121-8/+0
| | | | llvm-svn: 353889
* [SelectionDAG] Clean up comments in SelectionDAGBuilder.h. NFCBjorn Pettersson2019-02-121-46/+42
| | | | | | | Remove redundant function/variable names from doxygen comments (as suggested in https://reviews.llvm.org/D57697). llvm-svn: 353886
* Fix auto-upgrade for the new parameter to llvm.objectsizeErik Pilkington2019-02-121-2/+2
| | | | | | | | | | r352664 added a 'dynamic' parameter to objectsize, but the AutoUpgrade changes were incomplete. Also, fix an off-by-one error I made in the upgrade logic that is now no longer unreachable. Differential revision: https://reviews.llvm.org/D58071 llvm-svn: 353884
* Fix undefined behaviour in PPCInstPrinter::printBranchOperand.Sean Fertile2019-02-121-1/+1
| | | | | | | | Fix the undefined behaviour introduced by my previous patch r353865 (left shifting a potentially negative value), which was caught by the bots that run UBSan. llvm-svn: 353874
* [AArch64] Expand v8i8 cttz (PR39729)Nikita Popov2019-02-121-9/+1
| | | | | | | | | | | Fix for https://bugs.llvm.org/show_bug.cgi?id=39729. Rather than adding just a case for v8i8 I'm setting cttz to expand for all vector types. Differential Revision: https://reviews.llvm.org/D58008 llvm-svn: 353872
* [InlineSpiller] Fix a crash due to lack of forward progress from remat (try 2)Philip Reames2019-02-121-0/+35
| | | | | | | | | | | This is a recommit of r335091 Add more test cases for deopt-operands via regalloc, and r335077 [InlineSpiller] Fix a crash due to lack of forward progress from remat specifically for STATEPOINT. They were reverted due to a crash. This change includes the text of both original changes, but also includes three aditional pieces: 1) A bug fix for the observed crash. I had failed to record the failed remat value as live which resulted in an instruction being deleted which still had uses. With the machine verifier, this is caught quickly. Without it, we fail in StackSlotColoring due to an empty live interval from LiveStack. 2) A test case which demonstrates the fix for (1). See @test11. 3) A control flag which defaults to disabling this for the moment. Once I've run more extensive validaton, I will switch the default and then remove this flag. llvm-svn: 353871
* [SystemZ] Use VGM whenever possible to load FP immediates.Jonas Paulsson2019-02-123-2/+58
| | | | | | | | | | | | | isFPImmLegal() has been extended to recognize certain FP immediates that can be built with VGM (Vector Generate Mask). These scalar FP immediates (that were previously loaded from the constant pool) are now selected as VGMF/VGMG in Select(). Review: Ulrich Weigand https://reviews.llvm.org/D58003 llvm-svn: 353867
* [PowerPC] Fix printing of negative offsets in call instruction dissasembly.Sean Fertile2019-02-123-2/+15
| | | | llvm-svn: 353865
* [GlobalISel][NFC] Gardening: Make translateSimpleUnaryIntrinsic generalJessica Paquette2019-02-121-26/+18
| | | | | | | | | | | | | | Instead of only having this code work for unary intrinsics, have it work for an arbitrary number of parameters. Factor out the cases that fall under this (fma, pow). This makes it a bit easier to add more intrinsics which don't require any special work. Differential Revision: https://reviews.llvm.org/D58079 llvm-svn: 353863
* [GlobalISel][AArch64] Select llvm.bswap* for non-vector typesJessica Paquette2019-02-122-0/+40
| | | | | | | | | | | | | | | | This teaches the IRTranslator to emit G_BSWAP when it runs into Intrinsic::bswap. This allows us to select G_BSWAP for non-vector types in AArch64. Add a select-bswap.mir test, and add global isel checks to a couple existing tests in test/CodeGen/AArch64. This doesn't handle every bswap case, since some of these rely on known bits stuff. This just lets us handle the naive case. Differential Revision: https://reviews.llvm.org/D58081 llvm-svn: 353861
* [X86][AVX] Enable shuffle combining support for zero_extend Simon Pilgrim2019-02-121-3/+9
| | | | | | A more limited version of rL352997 that had to be disabled in rL353198 - allow extension of any 128/256/512 bit vector that at least uses byte sized scalars. llvm-svn: 353860
* [DAGCombiner] convert logic-of-setcc into bit magic (PR40611)Sanjay Patel2019-02-121-0/+26
| | | | | | | | | | | | | | | | | | | | If we're comparing some value for equality against 2 constants and those constants have an absolute difference of just 1 bit, then we can offset and mask off that 1 bit and reduce to a single compare against zero: and/or (setcc X, C0, ne), (setcc X, C1, ne/eq) --> setcc ((add X, -C1), ~(C0 - C1)), 0, ne/eq https://rise4fun.com/Alive/XslKj This transform is disabled by default using a TLI hook ("convertSetCCLogicToBitwiseLogic()"). That should be overridden for AArch64, MIPS, Sparc and possibly others based on the asm shown in: https://bugs.llvm.org/show_bug.cgi?id=40611 llvm-svn: 353859
* [SelectionDAG] Fix return calling convention in expansion of ?MULOwhitequark2019-02-121-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The SMULO/UMULO DAG nodes, when not directly supported by the target, expand to a multiplication twice as wide. In case that the resulting type is not legal, the legalizer cannot directly call the intrinsic with the wide arguments; instead, it "pre-lowers" them by splitting them in halves. rL283203 made sure that on big endian targets, the legalizer passes the argument halves in the correct order. It did not do the same for the return value halves because the existing code used a hack; it put an illegal type into DAG and hoped that nothing would break and it would be correctly lowered elsewhere. rL307207 fixed this, handling return value halves similar to how argument handles are handled, but did not take big-endian targets into account. This commit fixes the expansion on big-endian targets, such as the out-of-tree OR1K target. Reviewers: eli.friedman, vadimcn Subscribers: george-hopkins, efriedma, llvm-commits Differential Revision: https://reviews.llvm.org/D45355 llvm-svn: 353854
* [MCA] Improved debug prints. NFCAndrea Di Biagio2019-02-122-3/+21
| | | | llvm-svn: 353852
* [Codegen] Make sure kill flags are not incorrect from removed machine phi'sDavid Green2019-02-121-3/+4
| | | | | | | | | We need to clear the kill flags on both SingleValReg and OldReg, to ensure they remain conservatively correct. Differential Revision: https://reviews.llvm.org/D58114 llvm-svn: 353847
* AMDGPU/GlobalISel: Only make f16 constants legal on f16 targetsMatt Arsenault2019-02-121-2/+9
| | | | | | We could deal with it, but there's no real point. llvm-svn: 353845
* GlobalISel: Use default rounding mode when extending fconstantMatt Arsenault2019-02-121-3/+8
| | | | | | | I don't think this matters since the values should all be exactly representable. llvm-svn: 353844
* GlobalISel: Move some more legalize cases into functionsMatt Arsenault2019-02-121-165/+190
| | | | llvm-svn: 353843
* [NFC] Simplify code & reduce nest slightlyMax Kazantsev2019-02-121-33/+35
| | | | llvm-svn: 353832
* [DebugInfo] Don't salvage load operations (PR40628).Jeremy Morse2019-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Salvaging a redundant load instruction into a debug expression hides a memory read from optimisation passes. Passes that alter memory behaviour (such as LICM promoting memory to a register) aren't aware of these debug memory reads and leave them unaltered, making the debug variable location point somewhere unsafe. Teaching passes to know about these debug memory reads would be challenging and probably incomplete. Finding dbg.value instructions that need to be fixed would likely be computationally expensive too, as more analysis would be required. It's better to not generate debug-memory-reads instead, alas. Changed tests: * DeadStoreElim: test for salvaging of intermediate operations contributing to the dead store, instead of salvaging of the redundant load, * GVN: remove debuginfo behaviour checks completely, this behaviour is still covered by other tests, * InstCombine: don't test for salvaged loads, we're removing that behaviour. Differential Revision: https://reviews.llvm.org/D57962 llvm-svn: 353824
* [DebugInfo] Keep parameter DBG_VALUEs before prologue codeDavid Stenberg2019-02-121-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is a preparatory change for removing the code from DebugHandlerBase::beginFunction() which changes the starting label for the first non-overlapping DBG_VALUEs of parameters to the beginning of the function. It does that to be able to show parameters when entering a function. However, that code does not consider what defines the values, which can result in the ranges for the debug values starting before their defining instructions. That code is removed in a follow-up patch. When prologue code is inserted, it leads to DBG_VALUEs that start directly in the entry block being moved down after the prologue instructions. This patch fixes that by stashing away DBG_VALUEs for parameters before emitting the prologue, and then reinserts them at the start of the block. This assumes that there is no target that somehow clobbers parameter registers in the frame setup; there is no such case in the lit tests at least. See PR40188 for more information. Reviewers: aprantl, dblaikie, rnk, jmorse Reviewed By: aprantl Subscribers: bjope, llvm-commits Tags: #debug-info Differential Revision: https://reviews.llvm.org/D57510 llvm-svn: 353823
* [IndVars] Fix corner case with unreachable Phi inputs. PR40454Max Kazantsev2019-02-121-6/+20
| | | | | | | | | | | | | | | Logic in `getInsertPointForUses` doesn't account for a corner case when `Def` only comes to a Phi user from unreachable blocks. In this case, the incoming value may be arbitrary (and not even available in the input block) and break the loop-related invariants that are asserted below. In fact, if we encounter this situation, no IR modification is needed. This Phi will be simplified away with nearest cleanup. Differential Revision: https://reviews.llvm.org/D58045 Reviewed By: spatel llvm-svn: 353816
* [LoopSimplifyCFG] Change logic of dead loops removal to avoid hitting assertsMax Kazantsev2019-02-121-4/+21
| | | | | | | | | | | | | | | | | | | | The function `LI.erase` has some invariants that need to be preserved when it tries to remove a loop which is not the top-level loop. In particular, it requires loop's preheader to be strictly in loop's parent. Our current logic of deletion of dead blocks may erase the information about preheader before we handle the loop, and therefore we may hit this assertion. This patch changes the logic of loop deletion: we make them top-level loops before we actually erase them. This allows us to trigger the simple branch of `erase` logic which just detatches blocks from the loop and does not try to do some complex stuff that need this invariant. Thanks to @uabelho for reporting this! Differential Revision: https://reviews.llvm.org/D57221 Reviewed By: fedor.sergeev llvm-svn: 353813
* [yaml2obj/obj2yaml] - Move `Info` field out from `Section` class.George Rimar2019-02-121-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ELFYAML.h contains a `Section` class which is a base for a few other sections classes that are used for mapping different section types. `Section` has a `StringRef Info` field used for storing sh_info. At the same time, sh_info has very different meanings for sections and cannot be processed in a similar way generally, for example ELFDumper does not handle it in `dumpCommonSection` but do that in `dumpGroup` and `dumpCommonRelocationSection` respectively. At this moment, we have and handle it as a string, because that was possible for the current use case. But also it can simply be a number: For SHT_GNU_verdef is "The number of version definitions within the section." The patch moves `Info` field out to be able to have it as a number. With that change, each class will be able to decide what type and purpose of the sh_info field it wants to use. I also had to edit 2 test cases. This is because patch fixes a bug. Previously we accepted yaml files with Info fields for all sections (for example, for SHT_DYNSYM too). But we do not handle it and the resulting objects had zero sh_info fields set for such sections. Now it is accepted only for sections that supports it. Differential revision: https://reviews.llvm.org/D58054 llvm-svn: 353810
* Delete blocks from DTU to avoid dangling pointersMax Kazantsev2019-02-121-1/+1
| | | | llvm-svn: 353804
* [LoopSimplifyCFG] Pay respect to LCSSA when removing dead blocksMax Kazantsev2019-02-121-1/+1
| | | | | | | | | | | Utility function that we use for blocks deletion always unconditionally removes one-input Phis. In LoopSimplifyCFG, it can lead to breach of LCSSA form. This patch alters this function to keep them if needed. Differential Revision: https://reviews.llvm.org/D57231 Reviewed By: fedor.sergeev llvm-svn: 353803
* [NFC] Rename DontDeleteUselessPHIs --> KeepOneInputPHIsMax Kazantsev2019-02-127-20/+20
| | | | llvm-svn: 353801
* [Statepoint Lowering] Update misleading comments about chainsPhilip Reames2019-02-121-9/+7
| | | | llvm-svn: 353800
* [NFC] Add parameter for keeping one-input Phis in DeleteDeadBlock(s)Max Kazantsev2019-02-121-7/+9
| | | | llvm-svn: 353799
* [X86] Collapse FP_TO_INT16_IN_MEM/FP_TO_INT32_IN_MEM/FP_TO_INT64_IN_MEM into ↵Craig Topper2019-02-123-21/+19
| | | | | | a single opcode using memory VT to distinquish. NFC llvm-svn: 353798
* [X86] Remove the value type operand from the floating point load/store ↵Craig Topper2019-02-123-58/+84
| | | | | | | | MemIntrinsicSDNodes. Use the MemoryVT instead. NFCI We already have the memory VT, we can just match from that during isel. llvm-svn: 353797
* [LoopReroll] Fix reroll root legality checking.Eli Friedman2019-02-121-0/+10
| | | | | | | | | | | The code checked that the first root was an appropriate distance from the base value, but skipped checking the other roots. This could lead to rerolling a loop that can't be legally rerolled (at least, not without rewriting the loop in a non-trivial way). Differential Revision: https://reviews.llvm.org/D56812 llvm-svn: 353779
* DebugInfo: Split DWARF + gmlt + no-split-dwarf-inlining shouldn't emit ↵David Blaikie2019-02-122-2/+12
| | | | | | | | | | | | | | | anything to the .dwo file This configuration (due to r349207) was intended not to emit any DWO CU, but a degenerate CU was still being emitted - containing a header and a DW_TAG_compile_unit with no attributes. Under that situation, emit nothing to the .dwo file. (since this is a dynamic property of the input the .dwo file is still emitted, just with nothing in it (so a valid, but empty, ELF file) - if some other CU didn't satisfy this criteria, its DWO CU would still go there, etc) llvm-svn: 353771
* Be conservative about unordered accesses for the momentPhilip Reames2019-02-112-3/+8
| | | | | | | | | | Background: As described in https://reviews.llvm.org/D57601, I'm working towards separating volatile and atomic in the MMO uses for atomic instructions. In https://reviews.llvm.org/D57593, I fixed a bug where isUnordered was returning the wrong result, but didn't account for the fact I was getting slightly ahead of myself. While both uses of isUnordered are correct (as far as I can tell), we don't have tests to demonstrate this and being aggressive gets in the way of having the removal of volatile truly be non-functional. Once D57601 lands, I will return to these call sites, revert this patch, and add the appropriate tests to show the expected behaviour. Differential Revision: https://reviews.llvm.org/D57802 llvm-svn: 353766
* GlobalISel: Verify G_EXTRACTMatt Arsenault2019-02-111-0/+22
| | | | llvm-svn: 353759
* [TargetLibraryInfo] Update run time support for WindowsEvandro Menezes2019-02-111-47/+39
| | | | | | | | | It seems that, since VC19, the `float` C99 math functions are supported for all targets, unlike the C89 ones. According to the discussion at https://reviews.llvm.org/D57625. llvm-svn: 353758
* [LegalizeTypes] Expand FNEG to bitwise op for IEEE FP typesAna Pazos2019-02-111-0/+9
| | | | | | | | | | | | | | | | | Summary: Except for custom floating point types x86_fp80 and ppc_fp128, expand Y = FNEG(X) to Y = X ^ sign mask to avoid library call. Using bitwise operation can improve code size and performance. Reviewers: efriedma Reviewed By: efriedma Subscribers: efriedma, kpn, arsenm, eli.friedman, javed.absar, rbar, johnrusso, simoncook, sabuasal, niosHD, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, asb, llvm-commits Differential Revision: https://reviews.llvm.org/D57875 llvm-svn: 353757
* [IRReader] Expose getLazyIRModuleScott Linder2019-02-111-3/+3
| | | | | | | | | | | | Currently there is no way to lazy-load an in-memory IR module without first writing it to disk. This patch just exposes the existing implementation of getLazyIRModule. This is effectively a revert of rL212364 Differential Revision: https://reviews.llvm.org/D56203 llvm-svn: 353755
* GlobalISel: Implement moreElementsVector for implicit_defMatt Arsenault2019-02-112-1/+48
| | | | llvm-svn: 353754
* GlobalISel: Fix not calling the observer when legalizing G_EXTRACTMatt Arsenault2019-02-111-0/+2
| | | | llvm-svn: 353750
* [globalisel] Correct string emitted by GISelChangeObserver::erasingInstr()Daniel Sanders2019-02-111-1/+1
| | | | | | The API indicates that the MI is about to be erased rather than it has been erased. llvm-svn: 353746
OpenPOWER on IntegriCloud