Lines Matching defs:GraphT
33 template<class GraphT>
34 unsigned DFSPass(DominatorTreeBase<typename GraphT::NodeType>& DT,
35 typename GraphT::NodeType* V, unsigned N) {
56 SmallVector<std::pair<typename GraphT::NodeType*,
57 typename GraphT::ChildIteratorType>, 32> Worklist;
58 Worklist.push_back(std::make_pair(V, GraphT::child_begin(V)));
60 typename GraphT::NodeType* BB = Worklist.back().first;
61 typename GraphT::ChildIteratorType NextSucc = Worklist.back().second;
63 typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &BBInfo =
67 if (NextSucc == GraphT::child_begin(BB)) {
84 if (NextSucc == GraphT::child_end(BB)) {
93 typename GraphT::NodeType* Succ = *NextSucc;
95 typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &SuccVInfo =
99 Worklist.push_back(std::make_pair(Succ, GraphT::child_begin(Succ)));
106 template<class GraphT>
107 typename GraphT::NodeType*
108 Eval(DominatorTreeBase<typename GraphT::NodeType>& DT,
109 typename GraphT::NodeType *VIn, unsigned LastLinked) {
110 typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &VInInfo =
115 SmallVector<typename GraphT::NodeType*, 32> Work;
116 SmallPtrSet<typename GraphT::NodeType*, 32> Visited;
122 typename GraphT::NodeType* V = Work.back();
123 typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &VInfo =
125 typename GraphT::NodeType* VAncestor = DT.Vertex[VInfo.Parent];
138 typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &VAInfo =
140 typename GraphT::NodeType* VAncestorLabel = VAInfo.Label;
141 typename GraphT::NodeType* VLabel = VInfo.Label;
153 typedef GraphTraits<NodeT> GraphT;
158 typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &BBInfo =
170 N = DFSPass<GraphT>(DT, DT.Roots[i], N);
192 typename GraphT::NodeType* W = DT.Vertex[i];
193 typename DominatorTreeBase<typename GraphT::NodeType>::InfoRec &WInfo =
198 typename GraphT::NodeType* V = DT.Vertex[Buckets[j]];
199 typename GraphT::NodeType* U = Eval<GraphT>(DT, V, i + 1);
213 unsigned SemiU = DT.Info[Eval<GraphT>(DT, N, i + 1)].Semi;
231 typename GraphT::NodeType* Root = DT.Vertex[1];
233 typename GraphT::NodeType* V = DT.Vertex[Buckets[j]];
240 typename GraphT::NodeType* W = DT.Vertex[i];
241 typename GraphT::NodeType*& WIDom = DT.IDoms[W];
252 typename GraphT::NodeType* Root = !MultipleRoots ? DT.Roots[0] : 0;
255 new DomTreeNodeBase<typename GraphT::NodeType>(Root, 0);
259 typename GraphT::NodeType* W = DT.Vertex[i];
261 DomTreeNodeBase<typename GraphT::NodeType> *BBNode = DT.DomTreeNodes[W];
264 typename GraphT::NodeType* ImmDom = DT.getIDom(W);
269 DomTreeNodeBase<typename GraphT::NodeType> *IDomNode =
274 DomTreeNodeBase<typename GraphT::NodeType> *C =
275 new DomTreeNodeBase<typename GraphT::NodeType>(W, IDomNode);
282 std::vector<typename GraphT::NodeType*>().swap(DT.Vertex);