1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/Transforms/Scalar
Wei Mi e25039a021 [GVN] Verify value equality before doing phi translation for call instruction
This is an updated version of https://reviews.llvm.org/D66909 to fix PR42605.

Basically, current phi translatation translates an old value number to an new
value number for a call instruction based on the literal equality of call
expression, without verifying there is no clobber in between. This is incorrect.

To get a finegrain check, use MachineDependence analysis to do the job. However,
this is still not ideal. Although given a call instruction,
`MemoryDependenceResults::getCallDependencyFrom` returns identical call
instructions without clobber in between using MemDepResult with its DepType to
be `Def`. However, identical is too strict here and we want it to be relaxed a
little to consider phi-translation -- callee is the same, param operands can be
different. That means changing the semantic of `MemDepResult::Def` and I don't
know the potential impact.

So currently the patch is still conservative to only handle
MemDepResult::NonFuncLocal, which means the current call has no function local
clobber. If there is clobber, even if the clobber doesn't stand in between the
current call and the call with the new value, we won't do phi-translate.

Differential Revision: https://reviews.llvm.org/D67013

llvm-svn: 370547
2019-08-30 23:01:22 +00:00
..
ADCE.cpp [ADCE] Fix non-deterministic behaviour due to iterating over a pointer set. 2019-07-16 15:23:10 +00:00
AlignmentFromAssumptions.cpp [AlignmentFromAssumptions] getNewAlignmentDiff(): use getURemExpr() 2019-08-23 02:17:04 +00:00
BDCE.cpp [BDCE] Optimize find+insert with early insert 2019-03-07 06:38:03 +00:00
CallSiteSplitting.cpp CallSiteSplitting: Respect convergent and noduplicate 2019-05-29 16:59:48 +00:00
CMakeLists.txt Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline." 2019-06-26 12:13:13 +00:00
ConstantHoisting.cpp Use llvm::stable_sort 2019-04-23 14:51:27 +00:00
ConstantProp.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CorrelatedValuePropagation.cpp Let CorrelatedValuePropagation preserve LazyValueInfo 2019-07-24 20:27:32 +00:00
DCE.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DeadStoreElimination.cpp [DSE] Bugfix to avoid PartialStoreMerging involving non byte-sized stores 2019-05-24 08:32:02 +00:00
DivRemPairs.cpp [DivRemPairs] Fixup DNDEBUG build - variable is only used in assertion 2019-07-31 12:26:37 +00:00
EarlyCSE.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
FlattenCFGPass.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Float2Int.cpp Fix parameter name comments using clang-tidy. NFC. 2019-07-16 04:46:31 +00:00
GuardWidening.cpp [GuardWidening] Wire up a NPM version of the LoopGuardWidening pass 2019-04-18 19:17:14 +00:00
GVN.cpp [GVN] Verify value equality before doing phi translation for call instruction 2019-08-30 23:01:22 +00:00
GVNHoist.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
GVNSink.cpp [GVNSink] Add unary FNeg support to GVNSink pass 2019-06-28 19:57:31 +00:00
InductiveRangeCheckElimination.cpp Delete dead stores 2019-07-12 14:58:15 +00:00
IndVarSimplify.cpp [IndVars] Fix a bug noticed by inspection 2019-08-23 04:03:23 +00:00
InferAddressSpaces.cpp InferAddressSpaces: Move target intrinsic handling to TTI 2019-08-14 18:13:00 +00:00
InstSimplifyPass.cpp [InstSimplify] Report "Changed" also when only deleting dead instructions 2019-08-09 07:08:25 +00:00
IVUsersPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
JumpThreading.cpp [JumpThreading] Stop searching predecessor when the current bb is in a 2019-07-26 20:59:22 +00:00
LICM.cpp [MemorySSA] Rename uses when inserting memory uses. 2019-08-19 18:57:40 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LoopAccessAnalysisPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LoopDataPrefetch.cpp Allow prefetching from non-zero address spaces 2019-07-25 16:11:57 +00:00
LoopDeletion.cpp [SCEV] Rename getMaxBackedgeTakenCount to getConstantMaxBackedgeTakenCount [NFC] 2019-08-14 21:58:13 +00:00
LoopDistribute.cpp LoopDistribute/LAA: Respect convergent 2019-06-12 13:34:19 +00:00
LoopFuse.cpp [LoopFusion] Fix another -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build 2019-08-28 03:12:40 +00:00
LoopIdiomRecognize.cpp Remove an extra ";", NFC. 2019-08-30 12:09:31 +00:00
LoopInstSimplify.cpp [MemorySSA] Loop passes should mark MSSA preserved when available. 2019-08-17 01:02:12 +00:00
LoopInterchange.cpp Delete dead stores 2019-07-12 14:58:15 +00:00
LoopLoadElimination.cpp LoopLoadElim: Respect convergent 2019-06-12 13:50:47 +00:00
LoopPassManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LoopPredication.cpp [LoopInfo] Update getExitEdges to accept vector of pairs for non const BasicBlock 2019-07-09 04:20:43 +00:00
LoopRerollPass.cpp [LoopReroll] Fix reroll root legality checking. 2019-02-12 00:33:25 +00:00
LoopRotation.cpp [MemorySSA] Loop passes should mark MSSA preserved when available. 2019-08-17 01:02:12 +00:00
LoopSimplifyCFG.cpp [MemorySSA] Loop passes should mark MSSA preserved when available. 2019-08-17 01:02:12 +00:00
LoopSink.cpp [IR] Value: add replaceUsesWithIf() utility 2019-08-01 12:32:08 +00:00
LoopStrengthReduce.cpp [PowerPC] exclude more icmps in LSR which is converted in later hardware loop pass 2019-07-25 01:22:08 +00:00
LoopUnrollAndJamPass.cpp [Loop Peeling] Introduce an option for profile based peeling disabling. 2019-08-02 09:32:52 +00:00
LoopUnrollPass.cpp [Loop Peeling] Introduce an option for profile based peeling disabling. 2019-08-02 09:32:52 +00:00
LoopUnswitch.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
LoopVersioningLICM.cpp [Loop Utils] Move utilty addStringMetadataToLoop to LoopUtils.cpp. NFC. 2019-07-26 06:10:08 +00:00
LowerAtomic.cpp Transforms: lower fadd and fsub atomicrmw instructions 2019-05-23 17:03:43 +00:00
LowerExpectIntrinsic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LowerGuardIntrinsic.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LowerWidenableCondition.cpp Update more files added with the old header to the new one. 2019-02-11 08:25:56 +00:00
MakeGuardsExplicit.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MemCpyOptimizer.cpp Refactor isPointerOffset (NFC). 2019-08-19 21:08:04 +00:00
MergedLoadStoreMotion.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MergeICmps.cpp OpaquePtr: add Type parameter to Loads analysis API. 2019-07-09 11:35:35 +00:00
NaryReassociate.cpp [opaque pointer types] Pass value type to GetElementPtr creation. 2019-02-01 20:44:47 +00:00
NewGVN.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
PartiallyInlineLibCalls.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PlaceSafepoints.cpp [SCEV] Rename getMaxBackedgeTakenCount to getConstantMaxBackedgeTakenCount [NFC] 2019-08-14 21:58:13 +00:00
Reassociate.cpp [Reassoc] Small fix to support unary FNeg in NegateValue(...) 2019-08-23 15:49:38 +00:00
Reg2Mem.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RewriteStatepointsForGC.cpp [CallSite removal] Migrate the statepoint GC infrastructure to use the 2019-02-11 07:42:30 +00:00
Scalar.cpp Revert "r364412 [ExpandMemCmp][MergeICmps] Move passes out of CodeGen into opt pipeline." 2019-06-26 12:13:13 +00:00
Scalarizer.cpp [Scalarizer] Propagate IR flags 2019-06-21 14:10:18 +00:00
SCCP.cpp [IPSCCP] Move callsite check to the beginning of the loop. 2019-07-31 12:57:04 +00:00
SeparateConstOffsetFromGEP.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SimpleLoopUnswitch.cpp [MemorySSA] Loop passes should mark MSSA preserved when available. 2019-08-17 01:02:12 +00:00
SimplifyCFGPass.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Sink.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SpeculateAroundPHIs.cpp Ignore indirect branches from callbr. 2019-08-14 16:44:07 +00:00
SpeculativeExecution.cpp Support FNeg in SpeculativeExecution pass 2019-05-14 16:51:18 +00:00
SROA.cpp [Loads/SROA] Remove blatantly incorrect code and fix a bug revealed in the process 2019-08-27 19:34:43 +00:00
StraightLineStrengthReduce.cpp [opaque pointer types] Pass value type to GetElementPtr creation. 2019-02-01 20:44:47 +00:00
StructurizeCFG.cpp [StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default 2019-08-06 14:30:19 +00:00
TailRecursionElimination.cpp OpaquePtr: add Type parameter to Loads analysis API. 2019-07-09 11:35:35 +00:00
WarnMissedTransforms.cpp [IR] Refactor attribute methods in Function class (NFC) 2019-04-04 22:40:06 +00:00