aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveInterval.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-18 01:29:39 +0000
committerChris Lattner <sabre@nondot.org>2004-11-18 01:29:39 +0000
commit23b71c1e1e33219327b1c0edf43034dbe4c3ae90 (patch)
tree74175edd2800cb139f7325891171acda9172adf3 /include/llvm/CodeGen/LiveInterval.h
parent4b92ed6d584aaa34eab7a3ef60d277617adb9aca (diff)
Rename some methods, use 'begin' instead of 'start', add new LiveInterval
iterator/begin/end members. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-rw-r--r--include/llvm/CodeGen/LiveInterval.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index d23e4131f6..87cb570306 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -76,6 +76,11 @@ namespace llvm {
: reg(Reg), weight(Weight), NumValues(0) {
}
+
+ typedef Ranges::iterator iterator;
+ iterator begin() { return ranges.begin(); }
+ iterator end() { return ranges.end(); }
+
void swap(LiveInterval& other) {
std::swap(reg, other.reg);
std::swap(weight, other.weight);
@@ -91,21 +96,21 @@ namespace llvm {
bool empty() const { return ranges.empty(); }
- /// start - Return the lowest numbered slot covered by interval.
- unsigned start() const {
+ /// beginNumber - Return the lowest numbered slot covered by interval.
+ unsigned beginNumber() const {
assert(!empty() && "empty interval for register");
return ranges.front().start;
}
- /// end - return the maximum point of the interval of the whole,
+ /// endNumber - return the maximum point of the interval of the whole,
/// exclusive.
- unsigned end() const {
+ unsigned endNumber() const {
assert(!empty() && "empty interval for register");
return ranges.back().end;
}
bool expiredAt(unsigned index) const {
- return end() <= (index + 1);
+ return endNumber() <= (index + 1);
}
bool liveAt(unsigned index) const;
@@ -142,7 +147,7 @@ namespace llvm {
void removeRange(unsigned Start, unsigned End);
bool operator<(const LiveInterval& other) const {
- return start() < other.start();
+ return beginNumber() < other.beginNumber();
}
void dump() const;