mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-01 03:33:42 +00:00
Charge a formula for explicit multiplies on scaled registers too,
not just base registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116010 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0d6715a413
commit
23c3fde39a
@ -728,6 +728,9 @@ void Cost::RateRegister(const SCEV *Reg,
|
||||
(isa<SCEVUnknown>(cast<SCEVAddRecExpr>(Reg)->getStart()) ||
|
||||
isa<SCEVConstant>(cast<SCEVAddRecExpr>(Reg)->getStart()))))
|
||||
++SetupCost;
|
||||
|
||||
NumIVMuls += isa<SCEVMulExpr>(Reg) &&
|
||||
Reg->hasComputableLoopEvolution(L);
|
||||
}
|
||||
|
||||
/// RatePrimaryRegister - Record this register in the set. If we haven't seen it
|
||||
@ -762,9 +765,6 @@ void Cost::RateFormula(const Formula &F,
|
||||
return;
|
||||
}
|
||||
RatePrimaryRegister(BaseReg, Regs, L, SE, DT);
|
||||
|
||||
NumIVMuls += isa<SCEVMulExpr>(BaseReg) &&
|
||||
BaseReg->hasComputableLoopEvolution(L);
|
||||
}
|
||||
|
||||
if (F.BaseRegs.size() > 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user