diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-26 23:22:23 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-26 23:22:23 +0000 |
commit | 8fa16e47f88975b577fe1cafce1a366b78b2c340 (patch) | |
tree | 5be8a72a845bd307152a717707e6a21680738405 /lib/CodeGen/VirtRegMap.cpp | |
parent | b07dddda00ba3e7243af87940d079de4f2520f04 (diff) |
Clear maps right after basic block is processed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11892 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r-- | lib/CodeGen/VirtRegMap.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index e8225e2b19..2e6b16b770 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/lib/CodeGen/VirtRegMap.cpp @@ -89,8 +89,8 @@ namespace { tii_(tm_.getInstrInfo()), mri_(*tm_.getRegisterInfo()), vrm_(vrm), - p2vMap_(mri_.getNumRegs()), - dirty_(mri_.getNumRegs()) { + p2vMap_(mri_.getNumRegs(), 0), + dirty_(mri_.getNumRegs(), false) { DEBUG(std::cerr << "********** REWRITE MACHINE CODE **********\n"); DEBUG(std::cerr << "********** Function: " << mf_.getFunction()->getName() << '\n'); @@ -99,11 +99,11 @@ namespace { void eliminateVirtRegs() { for (MachineFunction::iterator mbbi = mf_.begin(), mbbe = mf_.end(); mbbi != mbbe; ++mbbi) { + DEBUG(std::cerr << mbbi->getBasicBlock()->getName() << ":\n"); + eliminateVirtRegsInMbb(*mbbi); // clear map and dirty flag p2vMap_.assign(p2vMap_.size(), 0); dirty_.assign(dirty_.size(), false); - DEBUG(std::cerr << mbbi->getBasicBlock()->getName() << ":\n"); - eliminateVirtRegsInMbb(*mbbi); } } |