[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveInterval.h
Evan Cheng
evan.cheng at apple.com
Tue Apr 17 13:25:33 PDT 2007
Changes in directory llvm/include/llvm/CodeGen:
LiveInterval.h updated: 1.35 -> 1.36
---
Log message:
Add a register allocation preference field; add a method to compute size of a live interval.
---
Diffs of the changes: (+6 -1)
LiveInterval.h | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
Index: llvm/include/llvm/CodeGen/LiveInterval.h
diff -u llvm/include/llvm/CodeGen/LiveInterval.h:1.35 llvm/include/llvm/CodeGen/LiveInterval.h:1.36
--- llvm/include/llvm/CodeGen/LiveInterval.h:1.35 Tue Mar 20 03:13:50 2007
+++ llvm/include/llvm/CodeGen/LiveInterval.h Tue Apr 17 15:25:11 2007
@@ -81,6 +81,7 @@
struct LiveInterval {
typedef SmallVector<LiveRange,4> Ranges;
unsigned reg; // the register of this interval
+ unsigned preference; // preferred register to allocate for this interval
float weight; // weight of this interval
MachineInstr* remat; // definition if the definition rematerializable
Ranges ranges; // the ranges in which this register is live
@@ -94,7 +95,7 @@
public:
LiveInterval(unsigned Reg, float Weight)
- : reg(Reg), weight(Weight), remat(NULL) {
+ : reg(Reg), preference(0), weight(Weight), remat(NULL) {
}
typedef Ranges::iterator iterator;
@@ -256,6 +257,10 @@
removeRange(LR.start, LR.end);
}
+ /// getSize - Returns the sum of sizes of all the LiveRange's.
+ ///
+ unsigned getSize() const;
+
bool operator<(const LiveInterval& other) const {
return beginNumber() < other.beginNumber();
}
More information about the llvm-commits
mailing list