aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalAnalysis.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.h')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.h b/lib/CodeGen/LiveIntervalAnalysis.h
index 1257e15771..7ef2e78ea6 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.h
+++ b/lib/CodeGen/LiveIntervalAnalysis.h
@@ -38,12 +38,10 @@ namespace llvm {
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");
@@ -59,6 +57,10 @@ namespace llvm {
return end() <= index;
}
+ bool liveAt(unsigned index) const;
+
+ bool overlaps(const Interval& other) const;
+
void addRange(unsigned start, unsigned end);
private: