aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-02-25 02:03:40 +0000
committerChris Lattner <sabre@nondot.org>2006-02-25 02:03:40 +0000
commit47cb7173ea48691343b1046a0228a87c03b4167e (patch)
tree5c245b353f68a623264fd80d66c19be8979804a4 /lib/CodeGen/VirtRegMap.cpp
parent540fec6b38c8107161a0db4f8a6b7cc50be38b4a (diff)
Remove debugging printout :)
Add a minor compile time win, no codegen change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--lib/CodeGen/VirtRegMap.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp
index 0c5fcc5a93..144780129d 100644
--- a/lib/CodeGen/VirtRegMap.cpp
+++ b/lib/CodeGen/VirtRegMap.cpp
@@ -419,8 +419,12 @@ namespace {
// register.
if (Op.PhysRegReused == PhysReg) {
// Yup, use the reload register that we didn't use before.
- return GetRegForReload(Op.AssignedPhysReg, MI,
- Spills, MaybeDeadStores);
+ unsigned NewReg = Op.AssignedPhysReg;
+
+ // Remove the record for the previous reuse. We know it can never be
+ // invalidated now.
+ Reuses.erase(Reuses.begin()+ro);
+ return GetRegForReload(NewReg, MI, Spills, MaybeDeadStores);
} else {
// Otherwise, we might also have a problem if a previously reused
// value aliases the new register. If so, codegen the previous reload
@@ -487,9 +491,6 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, const VirtRegMap &VRM) {
bool *PhysRegsUsed = MBB.getParent()->getUsedPhysregs();
- if (MBB.getBasicBlock()->getName() == "endif.3.i")
- std::cerr << "HERE\n";
-
for (MachineBasicBlock::iterator MII = MBB.begin(), E = MBB.end();
MII != E; ) {
MachineInstr &MI = *MII;