diff options
Diffstat (limited to 'contrib/llvm-project/llvm/lib/CodeGen/LiveInterval.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/CodeGen/LiveInterval.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/contrib/llvm-project/llvm/lib/CodeGen/LiveInterval.cpp b/contrib/llvm-project/llvm/lib/CodeGen/LiveInterval.cpp index 1cf354349c56..c81540602f59 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/LiveInterval.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/LiveInterval.cpp @@ -563,13 +563,15 @@ VNInfo *LiveRange::extendInBlock(SlotIndex StartIdx, SlotIndex Kill) { return CalcLiveRangeUtilVector(this).extendInBlock(StartIdx, Kill); } -/// Remove the specified segment from this range. Note that the segment must -/// be in a single Segment in its entirety. void LiveRange::removeSegment(SlotIndex Start, SlotIndex End, bool RemoveDeadValNo) { // Find the Segment containing this span. iterator I = find(Start); - assert(I != end() && "Segment is not in range!"); + + // No Segment found, so nothing to do. + if (I == end()) + return; + assert(I->containsInterval(Start, End) && "Segment is not entirely in range!"); @@ -629,6 +631,7 @@ void LiveRange::join(LiveRange &Other, const int *RHSValNoAssignments, SmallVectorImpl<VNInfo *> &NewVNInfo) { verify(); + Other.verify(); // Determine if any of our values are mapped. This is uncommon, so we want // to avoid the range scan if not. |
