mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-12 01:25:10 +00:00
When joining two intervals where the RHS is really simple, use a light-weight
method for joining the live ranges instead of the fully-general one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30049 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -351,6 +351,23 @@ void LiveInterval::join(LiveInterval &Other, int *LHSValNoAssignments,
|
||||
weight += Other.weight;
|
||||
}
|
||||
|
||||
/// MergeRangesInAsValue - Merge all of the intervals in RHS into this live
|
||||
/// interval as the specified value number. The LiveRanges in RHS are
|
||||
/// allowed to overlap with LiveRanges in the current interval, but only if
|
||||
/// the overlapping LiveRanges have the specified value number.
|
||||
void LiveInterval::MergeRangesInAsValue(const LiveInterval &RHS,
|
||||
unsigned LHSValNo) {
|
||||
// TODO: Make this more efficient.
|
||||
iterator InsertPos = begin();
|
||||
for (const_iterator I = RHS.begin(), E = RHS.end(); I != E; ++I) {
|
||||
// Map the ValId in the other live range to the current live range.
|
||||
LiveRange Tmp = *I;
|
||||
Tmp.ValId = LHSValNo;
|
||||
InsertPos = addRangeFrom(Tmp, InsertPos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// MergeInClobberRanges - For any live ranges that are not defined in the
|
||||
/// current interval, but are defined in the Clobbers interval, mark them
|
||||
/// used with an unknown definition value.
|
||||
|
Reference in New Issue
Block a user