1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 21:42:54 +02:00
llvm-mirror/test/Transforms
Daniel Berlin 99591fa12d NewGVN: Fix PR 31686 and PR 31698 by rewriting store leader handling.
Summary:

This rewrites store expression/leader handling.  We no longer use the
value operand as the leader, instead, we store it separately.  We also
now store the stored value as part of the expression, and compare it
when comparing stores for equality.  This enables us to get rid of a
bunch of our previous hacks and machinations, as the existing
machinery takes care of everything *except* updating the stored value
on classes.  The only time we have to update it is if the storecount
goes to 0, and when we do, we destroy it.

Since we no longer use the value operand as the leader, during elimination, we have to use the value operand.  Doing this also fixes a bunch of store forwarding cases we were missing.

Any value operand we use is guaranteed to either be updated by previous eliminations, or minimized by future ones.

(IE the fact that we don't use the most dominating value operand when it's not a constant does not affect anything).

Sadly, this change also exposes that we didn't pay attention to the
output of the pr31594.ll test, as it also very clearly exposes the
same store leader bug we are fixing here.

(I added pr31682.ll anyway, but maybe we think that's too large to be useful)

On the plus side, propagate-ir-flags.ll now passes due to the
corrected store forwarding.

This change was 3 stage'd on darwin and linux, with the full test-suite.

Reviewers:
davide
Subscribers:
llvm-commits

llvm-svn: 292648
2017-01-20 21:04:30 +00:00
..
ADCE
AddDiscriminators
AlignmentFromAssumptions
ArgumentPromotion
AtomicExpand
BBVectorize Introduce -unroll-partial-threshold to separate PartialThreshold from Threshold in loop unorller. 2017-01-17 23:39:33 +00:00
BDCE
BranchFolding
CodeExtractor
CodeGenPrepare [Analysis] Centralize objectsize lowering logic. 2016-12-20 23:46:36 +00:00
ConstantHoisting
ConstantMerge
ConstProp [InstCombiner] Simplify lib calls to round{,f} 2016-12-26 14:29:29 +00:00
Coroutines
CorrelatedValuePropagation Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
CountingFunctionInserter
CrossDSOCFI
DCE
DeadArgElim
DeadStoreElimination
EarlyCSE [EarlyCSE] Don't DSE across readnone functions that may throw 2017-01-17 20:15:47 +00:00
EliminateAvailableExternally
Float2Int
ForcedFunctionAttrs
FunctionAttrs
FunctionImport [ThinLTO] Ensure callees get hot threshold when first seen on cold path 2016-12-15 18:21:01 +00:00
GCOVProfiling [IR] Remove the DIExpression field from DIGlobalVariable. 2016-12-20 02:09:43 +00:00
GlobalDCE Test the different scenarios of GlobalDCE and comdats more 2016-12-26 08:54:01 +00:00
GlobalMerge Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
GlobalOpt Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
GlobalSplit
GuardWidening
GVN [AliasAnalysis] Fences do not modify constant memory location 2017-01-20 00:21:33 +00:00
GVNHoist Revert "[GVNHoist] Move GVNHoist to function simplification part of pipeline." 2016-12-17 01:53:15 +00:00
IndVarSimplify
InferFunctionAttrs
Inline Recommit "[InlineCost] Use TTI to check if GEP is free." #3 2017-01-20 18:51:22 +00:00
InstCombine [InstCombine][X86] Add MULDQ/MULUDQ undef handling 2017-01-20 18:20:30 +00:00
InstMerge
InstSimplify [ValueTracking] Extend known bits to understand @llvm.bitreverse. 2017-01-17 17:23:51 +00:00
InterleavedAccess/X86
Internalize
IPConstantProp
IRCE
JumpThreading Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
LCSSA
LICM [PM] Port LoopSink to the new pass manager. 2017-01-20 08:42:19 +00:00
LoadCombine
LoadStoreVectorizer
LoopDataPrefetch
LoopDeletion [PM] Teach LoopDeletion to correctly update the LPM when loops are 2017-01-18 02:41:26 +00:00
LoopDistribute Move test of lazy BFI with ORE to a generic directory 2017-01-13 00:16:23 +00:00
LoopIdiom Enable disabled loopidiom test. Apparently we handle it now 2017-01-03 19:08:05 +00:00
LoopInterchange
LoopLoadElim Fix LoopLoadElimination to keep original alignment on the inital hoisted store 2017-01-06 21:06:51 +00:00
LoopReroll
LoopRotate Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
LoopSimplify Make a test actually test what it set out to test. 2017-01-12 03:49:07 +00:00
LoopSimplifyCFG
LoopStrengthReduce [PM] Clean up the testing for IVUsers, especially with the new PM. 2017-01-15 09:29:27 +00:00
LoopUnroll Introduce -unroll-partial-threshold to separate PartialThreshold from Threshold in loop unorller. 2017-01-17 23:39:33 +00:00
LoopUnswitch
LoopVectorize [LV] Run loop-simplify and LCSSA explicitly instead of "requiring" them 2017-01-19 00:42:28 +00:00
LoopVersioning [LDist] Match behavior between invoking via optimization pipeline or opt -loop-distribute 2016-12-21 04:07:40 +00:00
LoopVersioningLICM
LowerAtomic
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerSwitch
LowerTypeTests LowerTypeTests: Implement exporting of type identifiers. 2017-01-19 01:20:11 +00:00
Mem2Reg
MemCpyOpt [MemCpyOpt] Don't sink LoadInst below possible clobber. 2016-12-27 17:58:12 +00:00
MergeFunc
MetaRenamer
NameAnonGlobals
NaryReassociate Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
NewGVN NewGVN: Fix PR 31686 and PR 31698 by rewriting store leader handling. 2017-01-20 21:04:30 +00:00
ObjCARC
PartiallyInlineLibCalls Add positive test for sqrt "partial inlining". NFC. 2017-01-04 21:24:56 +00:00
PGOProfile Resubmit "[PGO] Turn off comdat renaming in IR PGO by default" 2017-01-11 20:19:41 +00:00
PhaseOrdering
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH
Reassociate
Reg2Mem
RewriteStatepointsForGC
SafeStack
SampleProfile Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
Scalarizer
SCCP [SCCP] Teach the pass how to handle div with overdefined operands. 2017-01-19 23:07:51 +00:00
SeparateConstOffsetFromGEP
SimplifyCFG Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
Sink
SLPVectorizer [SLP] Initial test for fix of PR31690. 2017-01-20 18:40:21 +00:00
SpeculativeExecution
SROA
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
StructurizeCFG [StructurizeCfg] Update dominator info. 2017-01-10 02:50:47 +00:00
TailCallElim
ThinLTOBitcodeWriter ThinLTOBitcodeWriter: Clear comdats on filtered globals. 2017-01-18 20:03:02 +00:00
Util [AliasAnalysis] Teach BasicAA about memcpy. 2016-12-25 22:42:27 +00:00
WholeProgramDevirt