mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-01 08:28:19 +00:00
LSR: ignore strides in outer loops.
Since we're not rewriting IVs in other loops, there's not much reason to consider their stride when generating formulae. This should reduce the number of useless formulas considered by LSR. llvm-svn: 146302
This commit is contained in:
parent
ece09e5e6b
commit
65fca605c6
@ -2061,7 +2061,8 @@ void LSRInstance::CollectInterestingTypesAndFactors() {
|
||||
do {
|
||||
const SCEV *S = Worklist.pop_back_val();
|
||||
if (const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(S)) {
|
||||
Strides.insert(AR->getStepRecurrence(SE));
|
||||
if (EnableNested || AR->getLoop() == L)
|
||||
Strides.insert(AR->getStepRecurrence(SE));
|
||||
Worklist.push_back(AR->getStart());
|
||||
} else if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
|
||||
Worklist.append(Add->op_begin(), Add->op_end());
|
||||
|
Loading…
Reference in New Issue
Block a user