OSDN Git Service

Only add liveinterval to livein set if it isn't assigned a stack slot.
authorEvan Cheng <evan.cheng@apple.com>
Sun, 25 Feb 2007 09:39:02 +0000 (09:39 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Sun, 25 Feb 2007 09:39:02 +0000 (09:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34593 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocLinearScan.cpp

index 3a1bfc2..76fc580 100644 (file)
@@ -303,10 +303,10 @@ void RA::linearScan()
 
     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);
       }
     }