aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-09-30 16:10:45 +0000
committerChris Lattner <sabre@nondot.org>2004-09-30 16:10:45 +0000
commit477e4555de341c5de780de3720d6f115ec133c4e (patch)
tree762d00f298e9f7239c954ddb590d0e4f2289d4fb /lib/CodeGen/VirtRegMap.cpp
parent70ca358b7d540b6061236ddf757085042873c12c (diff)
There is no need to call MachineInstr::print directly, just send the MI& to an ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--lib/CodeGen/VirtRegMap.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index eb6553d53b..4d7c826a89 100644
--- a/lib/CodeGen/VirtRegMap.cpp
+++ b/lib/CodeGen/VirtRegMap.cpp
@@ -153,7 +153,7 @@ bool SimpleSpiller::runOnMachineFunction(MachineFunction& MF,
unsigned VirtReg = MOP.getReg();
unsigned PhysReg = VRM.getPhys(VirtReg);
if (VRM.hasStackSlot(VirtReg)) {
- int StackSlot = VRM.getStackSlot(VirtReg);
+ int StackSlot = VRM.getStackSlot(VirtReg);
if (MOP.isUse() &&
std::find(LoadedRegs.begin(), LoadedRegs.end(), VirtReg)
@@ -161,7 +161,7 @@ bool SimpleSpiller::runOnMachineFunction(MachineFunction& MF,
MRI.loadRegFromStackSlot(MBB, &MI, PhysReg, StackSlot);
LoadedRegs.push_back(VirtReg);
++NumLoads;
- DEBUG(std::cerr << '\t'; prior(MII)->print(std::cerr, &TM));
+ DEBUG(std::cerr << '\t' << *prior(MII));
}
if (MOP.isDef()) {
@@ -173,7 +173,7 @@ bool SimpleSpiller::runOnMachineFunction(MachineFunction& MF,
MI.SetMachineOperandReg(i, PhysReg);
}
}
- DEBUG(std::cerr << '\t'; MI.print(std::cerr, &TM));
+ DEBUG(std::cerr << '\t' << MI);
LoadedRegs.clear();
}
}
@@ -228,8 +228,7 @@ namespace {
MRI->loadRegFromStackSlot(MBB, MII, PhysReg,
VRM->getStackSlot(VirtReg));
++NumLoads;
- DEBUG(std::cerr << "added: ";
- prior(MII)->print(std::cerr, TM));
+ DEBUG(std::cerr << "added: " << *prior(MII));
lastDef_[VirtReg] = MII;
}
}
@@ -293,10 +292,8 @@ void LocalSpiller::vacateJustPhysReg(MachineBasicBlock& MBB,
PhysReg,
VRM->getStackSlot(VirtReg));
++NumStores;
- DEBUG(std::cerr << "added: ";
- prior(nextLastRef)->print(std::cerr, TM);
- std::cerr << "after: ";
- lastDef->print(std::cerr, TM));
+ DEBUG(std::cerr << "added: " << *prior(nextLastRef);
+ std::cerr << "after: " << *lastDef);
lastDef_[VirtReg] = 0;
}
p2vMap_[PhysReg] = 0;
@@ -360,7 +357,7 @@ void LocalSpiller::eliminateVirtRegsInMBB(MachineBasicBlock &MBB) {
}
}
- DEBUG(std::cerr << '\t'; MI->print(std::cerr, TM));
+ DEBUG(std::cerr << '\t' << *MI);
}
for (unsigned i = 1, e = p2vMap_.size(); i != e; ++i)