mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
Clients of addIntervalForSpills expect the added intervals to be returned sorted by starting index.
llvm-svn: 54939
This commit is contained in:
parent
467a8dc22e
commit
c25fc6fc35
@ -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…
Reference in New Issue
Block a user