mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Move some more instruction creation methods from RegisterInfo into InstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45484 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -144,7 +144,8 @@ unsigned RegAllocSimple::reloadVirtReg(MachineBasicBlock &MBB,
|
||||
|
||||
// Add move instruction(s)
|
||||
++NumLoads;
|
||||
MRI->loadRegFromStackSlot(MBB, I, PhysReg, FrameIdx, RC);
|
||||
const TargetInstrInfo* TII = MBB.getParent()->getTarget().getInstrInfo();
|
||||
TII->loadRegFromStackSlot(MBB, I, PhysReg, FrameIdx, RC);
|
||||
return PhysReg;
|
||||
}
|
||||
|
||||
@ -152,11 +153,13 @@ void RegAllocSimple::spillVirtReg(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator I,
|
||||
unsigned VirtReg, unsigned PhysReg) {
|
||||
const TargetRegisterClass* RC = MF->getRegInfo().getRegClass(VirtReg);
|
||||
const TargetInstrInfo* TII = MBB.getParent()->getTarget().getInstrInfo();
|
||||
|
||||
int FrameIdx = getStackSpaceFor(VirtReg, RC);
|
||||
|
||||
// Add move instruction(s)
|
||||
++NumStores;
|
||||
MRI->storeRegToStackSlot(MBB, I, PhysReg, true, FrameIdx, RC);
|
||||
TII->storeRegToStackSlot(MBB, I, PhysReg, true, FrameIdx, RC);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user