aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/IntervalPartition.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-06-25 03:54:14 +0000
committerChris Lattner <sabre@nondot.org>2001-06-25 03:54:14 +0000
commit4dd88f6fbf6dc44ceba03b34aeab458536789b98 (patch)
treeede31689254f3fb9e823f94eaa24b416825cc7e2 /include/llvm/Analysis/IntervalPartition.h
parentd6a7b7552f5cc0a254b2faaf91451d85870ca7dd (diff)
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
Diffstat (limited to 'include/llvm/Analysis/IntervalPartition.h')
-rw-r--r--include/llvm/Analysis/IntervalPartition.h35
1 files changed, 4 insertions, 31 deletions
diff --git a/include/llvm/Analysis/IntervalPartition.h b/include/llvm/Analysis/IntervalPartition.h
index fd24b2fb98..796c840b9a 100644
--- a/include/llvm/Analysis/IntervalPartition.h
+++ b/include/llvm/Analysis/IntervalPartition.h
@@ -77,38 +77,11 @@ public:
inline unsigned size() { return IntervalList.size(); }
private:
- // ProcessInterval - This method is used during the construction of the
- // interval graph. It walks through the source graph, recursively creating
- // an interval per invokation until the entire graph is covered. This uses
- // the ProcessNode method to add all of the nodes to the interval.
+ // addIntervalToPartition - Add an interval to the internal list of intervals,
+ // and then add mappings from all of the basic blocks in the interval to the
+ // interval itself (in the IntervalMap).
//
- // This method is templated because it may operate on two different source
- // graphs: a basic block graph, or a preexisting interval graph.
- //
- template<class NodeTy, class OrigContainer>
- void ProcessInterval(NodeTy *Node, OrigContainer *OC);
-
- // ProcessNode - This method is called by ProcessInterval to add nodes to the
- // interval being constructed, and it is also called recursively as it walks
- // the source graph. A node is added to the current interval only if all of
- // its predecessors are already in the graph. This also takes care of keeping
- // the successor set of an interval up to date.
- //
- // This method is templated because it may operate on two different source
- // graphs: a basic block graph, or a preexisting interval graph.
- //
- template<class NodeTy, class OrigContainer>
- void ProcessNode(Interval *Int, NodeTy *Node, OrigContainer *OC);
-
- // addNodeToInterval - This method exists to assist the generic ProcessNode
- // with the task of adding a node to the new interval, depending on the
- // type of the source node. In the case of a CFG source graph (BasicBlock
- // case), the BasicBlock itself is added to the interval. In the case of
- // an IntervalPartition source graph (Interval case), all of the member
- // BasicBlocks are added to the interval.
- //
- inline void addNodeToInterval(Interval *Int, Interval *I);
- inline void addNodeToInterval(Interval *Int, BasicBlock *BB);
+ void addIntervalToPartition(Interval *I);
// updatePredecessors - Interval generation only sets the successor fields of
// the interval data structures. After interval generation is complete,