diff options
author | Owen Anderson <resistor@mac.com> | 2008-08-18 19:52:22 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-08-18 19:52:22 +0000 |
commit | e996a12f27ee9f0e48c114ab355b68745f819d7d (patch) | |
tree | 8814fb16396b10c0864ba6cf28cc461c4b0fe866 /llvm/lib/CodeGen | |
parent | 30fc0583b3ed596eb408772ed17bff2469042f8c (diff) | |
download | bcm5719-llvm-e996a12f27ee9f0e48c114ab355b68745f819d7d.tar.gz bcm5719-llvm-e996a12f27ee9f0e48c114ab355b68745f819d7d.zip |
Clients of addIntervalForSpills expect the added intervals to be returned sorted by starting index.
llvm-svn: 54939
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index b70d610d55e..8781c2b7905 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -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; } |