diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-12-15 21:24:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-12-15 21:24:30 +0000 |
| commit | ed594b6b202513ac6a5d294fbd33a97f841729f9 (patch) | |
| tree | 92655e278983b87e904b5a54b65de64043ab94c1 /llvm | |
| parent | d06650ade13688b7c91425701be36a59400a12d4 (diff) | |
| download | bcm5719-llvm-ed594b6b202513ac6a5d294fbd33a97f841729f9.tar.gz bcm5719-llvm-ed594b6b202513ac6a5d294fbd33a97f841729f9.zip | |
Localize a map, remove another
llvm-svn: 5060
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocSimple.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/RegAllocSimple.cpp b/llvm/lib/CodeGen/RegAllocSimple.cpp index 73c193ba5b8..e1f10bf498c 100644 --- a/llvm/lib/CodeGen/RegAllocSimple.cpp +++ b/llvm/lib/CodeGen/RegAllocSimple.cpp @@ -49,15 +49,9 @@ namespace { // Maps SSA Regs => offsets on the stack where these values are stored std::map<unsigned, unsigned> VirtReg2OffsetMap; - // Maps SSA Regs => physical regs - std::map<unsigned, unsigned> SSA2PhysRegMap; - // Maps physical register to their register classes PhysRegClassMap PhysRegClasses; - // Made to combat the incorrect allocation of r2 = add r1, r1 - std::map<unsigned, unsigned> VirtReg2PhysRegMap; - // RegsUsed - Keep track of what registers are currently in use. std::set<unsigned> RegsUsed; @@ -134,7 +128,6 @@ namespace { void cleanupAfterFunction() { VirtReg2OffsetMap.clear(); - SSA2PhysRegMap.clear(); NumBytesAllocated = 4; // FIXME: This is X86 specific } @@ -357,6 +350,9 @@ void RegAllocSimple::AllocateBasicBlock(MachineBasicBlock &MBB) { //loop over each basic block for (MachineBasicBlock::iterator I = MBB.begin(); I != MBB.end(); ++I) { + // Made to combat the incorrect allocation of r2 = add r1, r1 + std::map<unsigned, unsigned> VirtReg2PhysRegMap; + MachineInstr *MI = *I; // a preliminary pass that will invalidate any registers that @@ -406,9 +402,7 @@ void RegAllocSimple::AllocateBasicBlock(MachineBasicBlock &MBB) { ", phys: " << op.getAllocatedRegNum() << "\n"); } } - clearAllRegs(); - VirtReg2PhysRegMap.clear(); } } |

