diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2007-02-25 09:39:02 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2007-02-25 09:39:02 +0000 |
| commit | 220a7af107395309addd9f84411549f463ba9746 (patch) | |
| tree | 4a24ded9e1dba7429643ab0fa6659e1670542259 /llvm/lib/CodeGen/RegAllocLinearScan.cpp | |
| parent | fcee9b55681da8f90b8456ddab32422edc4cd417 (diff) | |
| download | bcm5719-llvm-220a7af107395309addd9f84411549f463ba9746.tar.gz bcm5719-llvm-220a7af107395309addd9f84411549f463ba9746.zip | |
Only add liveinterval to livein set if it isn't assigned a stack slot.
llvm-svn: 34593
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocLinearScan.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp index 3a1bfc25fe8..76fc5809f52 100644 --- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp +++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp @@ -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); } } |

