[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveIntervals.h
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sat Dec 20 23:44:12 PST 2003
Changes in directory llvm/include/llvm/CodeGen:
LiveIntervals.h updated: 1.5 -> 1.6
---
Log message:
Add support for inactive intervals. This effectively reuses registers
for live ranges that fall into assigned registers' holes.
---
Diffs of the changes: (+6 -4)
Index: llvm/include/llvm/CodeGen/LiveIntervals.h
diff -u llvm/include/llvm/CodeGen/LiveIntervals.h:1.5 llvm/include/llvm/CodeGen/LiveIntervals.h:1.6
--- llvm/include/llvm/CodeGen/LiveIntervals.h:1.5 Thu Dec 18 02:56:11 2003
+++ llvm/include/llvm/CodeGen/LiveIntervals.h Sat Dec 20 23:43:40 2003
@@ -38,12 +38,10 @@
typedef std::pair<unsigned, unsigned> Range;
typedef std::vector<Range> Ranges;
unsigned reg; // the register of this interval
+ unsigned weight; // weight of this interval (number of uses)
Ranges ranges; // the ranges this register is valid
- Interval(unsigned r)
- : reg(r) {
-
- }
+ Interval(unsigned r);
unsigned start() const {
assert(!ranges.empty() && "empty interval for register");
@@ -58,6 +56,10 @@
bool expiredAt(unsigned index) const {
return end() <= index;
}
+
+ bool liveAt(unsigned index) const;
+
+ bool overlaps(const Interval& other) const;
void addRange(unsigned start, unsigned end);
More information about the llvm-commits
mailing list