Big changes. Interval*.h is now more or less finalized. IntervalPartition

is recoded to use IntervalIterators.  IntervalIterators can now maintain
their own memory or let an external entity do it.

Loop depth is a new user of IntervalPartition for calculating the loop
nesting depth of a basic block

TODO: add IntervalPartition capability to split intervals between the looping
portion and the "tail" portion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-06-25 03:54:14 +00:00
parent d6a7b7552f
commit 4dd88f6fbf
4 changed files with 106 additions and 64 deletions

View File

@@ -39,6 +39,9 @@ public:
Nodes.push_back(Header);
}
inline Interval(const Interval &I) // copy ctor
: HeaderNode(I.HeaderNode), Nodes(I.Nodes), Successors(I.Successors) {}
inline BasicBlock *getHeaderNode() const { return HeaderNode; }
// Nodes - The basic blocks in this interval.
@@ -74,6 +77,14 @@ public:
//return find(Successors.begin(), Successors.end(), BB) != Successors.end();
}
// Equality operator. It is only valid to compare two intervals from the same
// partition, because of this, all we have to check is the header node for
// equality.
//
inline bool operator==(const Interval &I) const {
return HeaderNode == I.HeaderNode;
}
// isLoop - Find out if there is a back edge in this interval...
bool isLoop() const;
};