mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
Let MRegisterInfo now owns RegScavenger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34691 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bb6fb3357d
commit
3f6fd87473
@ -442,9 +442,10 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
|
||||
const TargetMachine &TM = Fn.getTarget();
|
||||
assert(TM.getRegisterInfo() && "TM::getRegisterInfo() must be implemented!");
|
||||
const MRegisterInfo &MRI = *TM.getRegisterInfo();
|
||||
RegScavenger *RS = MRI.getRegScavenger();
|
||||
|
||||
for (MachineFunction::iterator BB = Fn.begin(), E = Fn.end(); BB != E; ++BB) {
|
||||
RegScavenger RS(BB);
|
||||
if (RS) RS->reset(BB);
|
||||
for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ++I) {
|
||||
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
|
||||
if (I->getOperand(i).isFrameIndex()) {
|
||||
@ -454,8 +455,7 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
|
||||
break;
|
||||
}
|
||||
// Update register states.
|
||||
if (MRI.requiresRegisterScavenging())
|
||||
RS.forward(I);
|
||||
if (RS) RS->forward(I);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user