aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-05-04 17:52:23 +0000
committerChris Lattner <sabre@nondot.org>2006-05-04 17:52:23 +0000
commite53f4a055f74bded20d6129b4724ddd17fd199f6 (patch)
tree298e99166cc5b20f68b64050b71a6d3dcf21f4ad /lib/CodeGen/VirtRegMap.cpp
parente3158308e0d51ce5c2624529e85c9a6be8f5ff46 (diff)
Move some methods out of MachineInstr into MachineOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--lib/CodeGen/VirtRegMap.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index 912359d137..533a53b8e8 100644
--- a/lib/CodeGen/VirtRegMap.cpp
+++ b/lib/CodeGen/VirtRegMap.cpp
@@ -182,7 +182,7 @@ bool SimpleSpiller::runOnMachineFunction(MachineFunction &MF, VirtRegMap &VRM) {
}
}
PhysRegsUsed[PhysReg] = true;
- MI.SetMachineOperandReg(i, PhysReg);
+ MI.getOperand(i).setReg(PhysReg);
} else {
PhysRegsUsed[MO.getReg()] = true;
}
@@ -458,7 +458,7 @@ namespace {
// Any stores to this stack slot are not dead anymore.
MaybeDeadStores.erase(NewOp.StackSlot);
- MI->SetMachineOperandReg(NewOp.Operand, NewPhysReg);
+ MI->getOperand(NewOp.Operand).setReg(NewPhysReg);
Spills.addAvailable(NewOp.StackSlot, NewPhysReg);
++NumLoads;
@@ -536,7 +536,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
// This virtual register was assigned a physreg!
unsigned Phys = VRM.getPhys(VirtReg);
PhysRegsUsed[Phys] = true;
- MI.SetMachineOperandReg(i, Phys);
+ MI.getOperand(i).setReg(Phys);
continue;
}
@@ -567,7 +567,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
<< MRI->getName(PhysReg) << " for vreg"
<< VirtReg <<" instead of reloading into physreg "
<< MRI->getName(VRM.getPhys(VirtReg)) << "\n");
- MI.SetMachineOperandReg(i, PhysReg);
+ MI.getOperand(i).setReg(PhysReg);
// The only technical detail we have is that we don't know that
// PhysReg won't be clobbered by a reloaded stack slot that occurs
@@ -618,7 +618,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
<< MRI->getName(PhysReg) << " for vreg"
<< VirtReg
<< " instead of reloading into same physreg.\n");
- MI.SetMachineOperandReg(i, PhysReg);
+ MI.getOperand(i).setReg(PhysReg);
++NumReused;
continue;
}
@@ -633,7 +633,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
Spills.ClobberPhysReg(DesignatedReg);
Spills.addAvailable(StackSlot, DesignatedReg);
- MI.SetMachineOperandReg(i, DesignatedReg);
+ MI.getOperand(i).setReg(DesignatedReg);
DEBUG(std::cerr << '\t' << *prior(MII));
++NumReused;
continue;
@@ -662,7 +662,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
MaybeDeadStores.erase(StackSlot);
Spills.addAvailable(StackSlot, PhysReg);
++NumLoads;
- MI.SetMachineOperandReg(i, PhysReg);
+ MI.getOperand(i).setReg(PhysReg);
DEBUG(std::cerr << '\t' << *prior(MII));
}
@@ -817,7 +817,7 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM) {
PhysRegsUsed[PhysReg] = true;
MRI->storeRegToStackSlot(MBB, next(MII), PhysReg, StackSlot, RC);
DEBUG(std::cerr << "Store:\t" << *next(MII));
- MI.SetMachineOperandReg(i, PhysReg);
+ MI.getOperand(i).setReg(PhysReg);
// Check to see if this is a noop copy. If so, eliminate the
// instruction before considering the dest reg to be changed.