diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 2ef1ccae6d7..35bbf081cb0 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -159,7 +159,6 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) { } } - intervals_.sort(); DEBUG(std::cerr << "********** INTERVALS **********\n"); DEBUG(std::copy(intervals_.begin(), intervals_.end(), std::ostream_iterator(std::cerr, "\n"))); @@ -263,15 +262,6 @@ std::vector LiveIntervals::addIntervalsForSpills( } } - // FIXME: This method MUST return intervals in sorted order. If a - // particular machine instruction both uses and defines the vreg being - // spilled (e.g., vr = vr + 1) and if the def is processed before the - // use, the list ends up not sorted. - // - // The proper way to fix this is to process all uses of the vreg before we - // process any defs. However, this would require refactoring the above - // blob of code, which I'm not feeling up to right now. - std::sort(added.begin(), added.end(), less_ptr()); return added; }