Fixed bug with running out of registers. Also, reinstated namespace which

disappeared during the last checkin.

llvm-svn: 5007
This commit is contained in:
Misha Brukman 2002-12-13 10:42:31 +00:00
parent eda9c79bbf
commit 89ff3fbcd6
1 changed files with 5 additions and 2 deletions

View File

@ -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