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 | bc025fbb64038b9f2c6615dd2d090c1c2ba0a91c (patch) | |
tree | b7cbb81333067694b0549e0e59ae280a765acb85 /lib/CodeGen/RegAllocLinearScan.cpp | |
parent | 5e265b29ea1420db59b943bf95a1cb14fa9ca8c5 (diff) |
Only add liveinterval to livein set if it isn't assigned a stack slot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34593 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 3a1bfc25fe..76fc5809f5 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/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); } } |