diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-09 04:35:38 +0000 | 
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-09 04:35:38 +0000 | 
| commit | cac54d6435ea39acfcb0c573942c4df8c76eeccd (patch) | |
| tree | dc18a39162224fc1630c98408baa1c4d65348cb5 | |
| parent | 7099f0c0d5c55b4ba70c5ace273709d420b76fb2 (diff) | |
| download | bcm5719-llvm-cac54d6435ea39acfcb0c573942c4df8c76eeccd.tar.gz bcm5719-llvm-cac54d6435ea39acfcb0c573942c4df8c76eeccd.zip | |
Deal with a few remaining spots that assume physical registers have live intervals.
This fixes PR7601.
llvm-svn: 107955
| -rw-r--r-- | llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp index 2e7e6f8b158..87337c9676e 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -482,6 +482,8 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(const CoalescerPair &CP,      // extended to the end of the existing live range defined by the copy.      SlotIndex DefIdx = UseIdx.getDefIndex();      const LiveRange *DLR = IntB.getLiveRangeContaining(DefIdx); +    if (!DLR) +      continue;      BHasPHIKill |= DLR->valno->hasPHIKill();      assert(DLR->valno->def == DefIdx);      BDeadValNos.push_back(DLR->valno); @@ -949,8 +951,8 @@ SimpleRegisterCoalescing::ShortenDeadCopySrcLiveRange(LiveInterval &li,      // Live-in to the function but dead. Remove it from entry live-in set.      if (mf_->begin()->isLiveIn(li.reg))        mf_->begin()->removeLiveIn(li.reg); -    const LiveRange *LR = li.getLiveRangeContaining(CopyIdx); -    removeRange(li, LR->start, LR->end, li_, tri_); +    if (const LiveRange *LR = li.getLiveRangeContaining(CopyIdx)) +      removeRange(li, LR->start, LR->end, li_, tri_);      return removeIntervalIfEmpty(li, li_, tri_);    } | 

