mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 00:33:15 +00:00
Clients of addIntervalForSpills expect the added intervals to be returned sorted by starting index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54939 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d7cbd1574f
commit
133f10f9bd
@ -1596,6 +1596,13 @@ LiveIntervals::handleSpilledImpDefs(const LiveInterval &li, VirtRegMap &vrm,
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
struct LISorter {
|
||||
bool operator()(LiveInterval* A, LiveInterval* B) {
|
||||
return A->beginNumber() < B->beginNumber();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
std::vector<LiveInterval*> LiveIntervals::
|
||||
addIntervalsForSpillsFast(const LiveInterval &li,
|
||||
@ -1677,6 +1684,8 @@ addIntervalsForSpillsFast(const LiveInterval &li,
|
||||
|
||||
SSWeight = HUGE_VALF;
|
||||
|
||||
std::sort(added.begin(), added.end(), LISorter());
|
||||
|
||||
return added;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user