mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-07 05:30:25 +00:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user