When spilling an register, introduce a new temporary for each of its
spills. This allows for more flexibility when allocating registers for
spill code.
llvm-svn: 13907
diff --git a/llvm/lib/CodeGen/LiveIntervals.h b/llvm/lib/CodeGen/LiveIntervals.h
index ee28cf6..dda1637 100644
--- a/llvm/lib/CodeGen/LiveIntervals.h
+++ b/llvm/lib/CodeGen/LiveIntervals.h
@@ -80,9 +80,9 @@
}
};
- struct EndPointComp {
- bool operator()(const Interval& lhs, const Interval& rhs) {
- return lhs.ranges.back().second < rhs.ranges.back().second;
+ struct StartPointPtrComp {
+ bool operator()(const Interval* lhs, const Interval* rhs) {
+ return lhs->ranges.front().first < rhs->ranges.front().first;
}
};
@@ -164,7 +164,9 @@
Intervals& getIntervals() { return intervals_; }
- void updateSpilledInterval(Interval& i, VirtRegMap& vrm, int slot);
+ std::vector<Interval*> addIntervalsForSpills(const Interval& i,
+ VirtRegMap& vrm,
+ int slot);
private:
/// computeIntervals - compute live intervals