mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 13:40:30 +00:00
c7e5bebc4a
When folding arguments of AddExpr or MulExpr with recurrences, we rely on the fact that the loop of our base recurrency is the bottom-lost in terms of domination. This assumption may be broken by an expression which is treated as invariant, and which depends on a complex Phi for which SCEVUnknown was created. If such Phi is a loop Phi, and this loop is lower than the chosen AddRecExpr's loop, it is invalid to fold our expression with the recurrence. Another reason why it might be invalid to fold SCEVUnknown into Phi start value is that unlike other SCEVs, SCEVUnknown are sometimes position-bound. For example, here: for (...) { // loop phi = {A,+,B} } X = load ... Folding phi + X into {A+X,+,B}<loop> actually makes no sense, because X does not exist and cannot exist while we are iterating in loop (this memory can be even not allocated and not filled by this moment). It is only valid to make such folding if X is defined before the loop. In this case the recurrence {A+X,+,B}<loop> may be existant. This patch prohibits folding of SCEVUnknown (and those who use them) into the start value of an AddRecExpr, if this instruction is dominated by the loop. Merging the dominating unknown values is still valid. Some tests that relied on the fact that some SCEVUnknown should be folded into AddRec's are changed so that they no longer expect such behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303730 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
AliasSet | ||
AssumptionCache | ||
BasicAA | ||
BlockFrequencyInfo | ||
BranchProbabilityInfo | ||
CallGraph | ||
CFLAliasAnalysis | ||
ConstantFolding | ||
CostModel | ||
Delinearization | ||
DemandedBits | ||
DependenceAnalysis | ||
DivergenceAnalysis | ||
DominanceFrontier | ||
Dominators | ||
GlobalsModRef | ||
IVUsers | ||
LazyCallGraph | ||
LazyValueAnalysis | ||
Lint | ||
LoopAccessAnalysis | ||
LoopInfo | ||
MemoryDependenceAnalysis | ||
MemorySSA | ||
PostDominators | ||
ProfileSummary | ||
RegionInfo | ||
ScalarEvolution | ||
ScopedNoAliasAA | ||
TypeBasedAliasAnalysis | ||
ValueTracking | ||
alias-analysis-uses.ll |