1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/Transforms
Nikita Popov 730509657a [InstCombine] DCE instructions earlier
When InstCombine initially populates the worklist, it already
performs constant folding and DCE. However, as the instructions
are initially visited in program order, this DCE can pick up only
the last instruction of a dead chain, the rest would only get
picked up in the main InstCombine run.

To avoid this, we instead perform the DCE in separate pass over the
collected instructions in reverse order, which will allow us to
pick up full dead instruction chains. We already need to do this
reverse iteration anyway to populate the worklist, so this
shouldn't add extra cost.

This by itself only fixes a small part of the problem though:
The same basic issue also applies during the main InstCombine loop.
We generally always want DCE to occur as early as possible,
because it will allow one-use folds to happen. Address this by also
performing DCE while adding deferred instructions to the main worklist.

This drops the number of tests that perform more than 2 InstCombine
iterations from ~80 to ~40. There's some spurious test changes due
to operand order / icmp toggling.

Differential Revision: https://reviews.llvm.org/D75008
2020-02-27 18:45:59 +01:00
..
ADCE Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
AddDiscriminators Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
AggressiveInstCombine [AggressiveInstCombine] Add test with baseline CHECKs for aggressive inst combine for ICmp instruction. 2020-02-12 15:09:38 +02:00
AlignmentFromAssumptions
ArgumentPromotion
AtomicExpand
Attributor [Attributor] Use AssumptionCache in AANonNullFloating::initialize 2020-02-25 13:00:03 +09:00
BDCE
BlockExtractor Revert "Revert "Reland "[Support] make report_fatal_error abort instead of exit""" 2020-02-13 10:16:06 -08:00
BranchFolding
CalledValuePropagation
CallSiteSplitting
CanonicalizeAliases
CodeExtractor [LoopExtractor] Convert LoopExtractor from LoopPass to ModulePass 2020-02-09 12:25:21 +02:00
CodeGenPrepare Recommit "[PatternMatch] Match XOR variant of unsigned-add overflow check." 2020-02-23 18:33:18 +00:00
ConstantHoisting Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
ConstantMerge
ConstProp Fix tests of constant folding of fp operations on NaN values 2020-01-21 21:48:07 +02:00
Coroutines [Coroutines][5/6] Add coroutine passes to pipeline 2020-02-19 00:57:14 -05:00
CorrelatedValuePropagation [CVP] Simplify cmp of local phi node 2020-02-26 20:36:41 +01:00
CrossDSOCFI
DCE
DeadArgElim [NFC] Fix trivial typos in comments 2020-01-06 10:50:26 +00:00
DeadStoreElimination [DSE,MSSA] Do not attempt to remove un-removable memdefs. 2020-02-25 13:31:46 +00:00
DivRemPairs
EarlyCSE [EarlyCSE] avoid crashing when detecting min/max/abs patterns (PR41083) 2020-02-10 17:25:34 -05:00
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp
Float2Int
ForcedFunctionAttrs
FunctionAttrs
FunctionImport Revert "Revert "Reland "[Support] make report_fatal_error abort instead of exit""" 2020-02-13 10:16:06 -08:00
GCOVProfiling Revert "Revert "Reland "[Support] make report_fatal_error abort instead of exit""" 2020-02-13 10:16:06 -08:00
GlobalDCE [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables 2020-01-23 11:36:01 -08:00
GlobalMerge
GlobalOpt [Transforms][GlobalSRA] huge array causes long compilation time and huge memory usage. 2020-01-04 16:42:38 +03:00
GlobalSplit [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables 2020-01-23 11:36:01 -08:00
GuardWidening
GVN [GVN] Add GVNOption to control load-pre more fine-grained. 2020-02-03 23:00:58 -08:00
GVNHoist Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
GVNSink
HardwareLoops
HotColdSplit [HotColdSplit] Mark entire function cold when entry block is cold 2020-02-17 15:57:50 -08:00
IndirectBrExpand
IndVarSimplify [SCEV][IndVars] Always provide insertion point to the SCEVExpander::isHighCostExpansion() 2020-02-25 23:05:59 +03:00
InferAddressSpaces
InferFunctionAttrs
Inline Revert "Devirtualize a call on alloca without waiting for post inline cleanup and next" 2020-02-27 15:58:39 +01:00
InstCombine [InstCombine] DCE instructions earlier 2020-02-27 18:45:59 +01:00
InstMerge
InstNamer
InstSimplify [ConstantFold] add/move tests for FP with undef operand; NFC 2020-02-20 15:07:11 -05:00
InterleavedAccess
Internalize
IPConstantProp [SCCP] Do not mark unknown loads as overdefined. 2020-02-20 22:48:58 +01:00
IRCE [IRCE] Use SCEVExpander to modify loop bound 2020-02-06 12:44:43 +03:00
JumpThreading [JumpThreading] Skip unconditional PredBB when threading jumps through two basic blocks 2020-02-18 11:01:46 -08:00
LCSSA [SSAUpdater] Don't call ValueIsRAUWd upon single use replacement 2020-01-23 15:53:53 +07:00
LICM Revert "[LICM] Support hosting of dynamic allocas out of loops" 2020-02-25 09:05:31 -08:00
LoadStoreVectorizer AMDGPU: Don't report 2-byte alignment as fast 2020-02-11 18:35:00 -05:00
LoopDataPrefetch
LoopDeletion
LoopDistribute
LoopFusion [LoopFusion] Move instructions from FC1.GuardBlock to FC0.GuardBlock and 2020-01-30 18:02:22 +00:00
LoopIdiom
LoopInstSimplify
LoopInterchange [DA] Delinearization of fixed-size multi-dimensional arrays 2020-02-27 10:29:01 -05:00
LoopLoadElim
LoopPredication [BasicBlock] fix looping in getPostdominatingDeoptimizeCall 2020-01-17 15:40:02 +03:00
LoopReroll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
LoopRotate [LoopRotate] add ability to repeat loop rotation until non-deoptimizing exit is found 2020-01-23 15:56:24 +03:00
LoopSimplify [LoopSimplify] Regenerate test checks; NFC 2020-01-11 11:02:24 +01:00
LoopSimplifyCFG
LoopStrengthReduce Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
LoopTransformWarning
LoopUnroll [LoopUnroll] Avoid UB when converting from WeakVH to Value * 2020-01-23 10:36:39 -08:00
LoopUnrollAndJam [llvm] Make new pass manager's OptimizationLevel a class 2020-01-16 09:00:56 -08:00
LoopUnswitch
LoopVectorize [CostModel][X86] Improve extract/insert element costs (PR43605) 2020-02-27 15:54:13 +00:00
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerConstantIntrinsics
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics [Matrix] Mark matrix memory intrinsics as argmemonly/write|read mem. 2020-02-04 12:32:45 +00:00
LowerSwitch
LowerTypeTests
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt MemCpyOpt cannot use ABI alignment even if it was not given 2020-02-06 06:21:55 +09:00
MergeFunc [NewPM] Port MergeFunctions pass 2020-01-14 20:55:41 +01:00
MergeICmps Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
MetaRenamer
NameAnonGlobals
NaryReassociate
NewGVN Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
ObjCARC [ObjC][ARC] Don't move a retain call living outside a loop into the loop 2020-02-25 13:00:10 -08:00
OpenMP [OpenMP][Opt] Combine struct ident_t* during deduplication 2020-02-25 14:07:14 -08:00
PartiallyInlineLibCalls
PGOProfile [PGO] Attach appropriate funclet operand bundles to value profiling instrumentation calls 2020-01-24 11:20:53 -08:00
PhaseOrdering [PhaseOrdering] add tests for missed CSE; NFC 2020-02-25 14:30:59 -05:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate Remove BinaryOperator::CreateFNeg 2020-02-27 09:06:03 -08:00
Reg2Mem
RewriteStatepointsForGC
SafeStack Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
SampleProfile Fix test for profile remapper 2020-02-18 17:58:32 -08:00
ScalarizeMaskedMemIntrin/X86
Scalarizer Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
SCCP [SCCP] Do not mark unknown loads as overdefined. 2020-02-20 22:48:58 +01:00
SeparateConstOffsetFromGEP [SeparateConstOffsetFromGEP] Fix: sext(a) + sext(b) -> sext(a + b) matches add and sub instructions with one another 2020-01-17 12:22:52 -05:00
SimpleLoopUnswitch [SimpleLoopUnswitch] Fix introduction of UB when hoisted condition may be undef or poison 2020-02-26 13:47:33 +09:00
SimplifyCFG [InstCombine] DCE instructions earlier 2020-02-27 18:45:59 +01:00
Sink
SLPVectorizer [CostModel][X86] Improve extract/insert element costs (PR43605) 2020-02-27 15:54:13 +00:00
SpeculateAroundPHIs
SpeculativeExecution
SROA [Metadata] Add TBAA struct metadata to AAMDNode 2020-01-06 11:05:15 +03:00
StraightLineStrengthReduce Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
StripDeadPrototypes
StripSymbols
StructurizeCFG AMDGPU: Update more tests to use modern buffer intrinsics 2020-01-16 14:29:38 -05:00
SyntheticCountsPropagation
TailCallElim
ThinLTOBitcodeWriter
TypePromotion/ARM Revert "[ARM][TypePromotion] Enable by default" 2019-12-22 11:27:11 -08:00
Util Build assume from call 2020-02-02 19:43:36 +01:00
VectorCombine/X86 [VectorCombine] add tests for possible extract->shuffle; NFC 2020-02-25 08:41:59 -05:00
WholeProgramDevirt Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-02-11 10:48:05 -08:00