[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp

Evan Cheng evan.cheng at apple.com
Sun Feb 25 01:39:19 PST 2007



Changes in directory llvm/lib/CodeGen:

RegAllocLinearScan.cpp updated: 1.140 -> 1.141
---
Log message:

Only add liveinterval to livein set if it isn't assigned a stack slot.

---
Diffs of the changes:  (+4 -4)

 RegAllocLinearScan.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.140 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.141
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.140	Mon Feb 19 15:49:53 2007
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp	Sun Feb 25 03:39:02 2007
@@ -303,10 +303,10 @@
 
     for (unsigned i = 0, e = handled_.size(); i != e; ++i) { 
       LiveInterval *HI = handled_[i];
-      if (HI->liveAt(StartIdx)) {
-        unsigned Reg = HI->reg;
-        if (MRegisterInfo::isVirtualRegister(Reg))
-          Reg = vrm_->getPhys(Reg);
+      unsigned Reg = HI->reg;
+      if (!vrm_->hasStackSlot(Reg) && HI->liveAt(StartIdx)) {
+        assert(MRegisterInfo::isVirtualRegister(Reg));
+        Reg = vrm_->getPhys(Reg);
         MBB->addLiveIn(Reg);
       }
     }






More information about the llvm-commits mailing list