aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/RegAllocSimple.cpp
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2002-12-13 10:42:31 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2002-12-13 10:42:31 +0000
commit59b3eedf31e0320d24060e064527c95457df5512 (patch)
tree18a7dea968b6ee4c10248b7febea2d2fdf981d36 /lib/CodeGen/RegAllocSimple.cpp
parent790f64bce8b7aaa80dbe3ab85d678a7ecf9aad57 (diff)
Fixed bug with running out of registers. Also, reinstated namespace which
disappeared during the last checkin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocSimple.cpp')
-rw-r--r--lib/CodeGen/RegAllocSimple.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp
index 6220169234..609eabf516 100644
--- a/lib/CodeGen/RegAllocSimple.cpp
+++ b/lib/CodeGen/RegAllocSimple.cpp
@@ -20,7 +20,7 @@
#include "Support/Statistic.h"
#include <map>
-//namespace {
+namespace {
struct RegAllocSimple : public FunctionPass {
TargetMachine &TM;
MachineBasicBlock *CurrMBB;
@@ -111,7 +111,7 @@
}
};
-//}
+}
unsigned RegAllocSimple::allocateStackSpaceFor(unsigned VirtReg,
const TargetRegisterClass *regClass)
@@ -289,6 +289,9 @@ bool RegAllocSimple::runOnMachineFunction(MachineFunction &Fn) {
// really delete the instruction
delete MI;
+
+ // make regs available to other instructions
+ clearAllRegs();
}
//loop over each basic block