mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-23 20:29:30 +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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
48171e7fbe
commit
fa1948a40f
@ -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…
x
Reference in New Issue
Block a user