-F("postdomtree", "Post-Dominator Tree Construction", true);
-
-unsigned PostDominatorTree::DFSPass(BasicBlock *V, unsigned N) {
- std::vector<BasicBlock *> workStack;
- SmallPtrSet<BasicBlock *, 32> Visited;
- workStack.push_back(V);
-
- do {
- BasicBlock *currentBB = workStack.back();
- InfoRec &CurVInfo = Info[currentBB];
-
- // Visit each block only once.
- if (Visited.insert(currentBB)) {
- CurVInfo.Semi = ++N;
- CurVInfo.Label = currentBB;
-
- Vertex.push_back(currentBB); // Vertex[n] = current;
- // Info[currentBB].Ancestor = 0;
- // Ancestor[n] = 0
- // Child[currentBB] = 0;
- CurVInfo.Size = 1; // Size[currentBB] = 1
- }
+F("postdomtree", "Post-Dominator Tree Construction", true, true);