clang-format GenericDomTreeConstruction.h, since the current formatting makes it look like their is a bug in the loop indentation, and there is not

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Berlin 2017-03-01 02:50:46 +00:00
parent 037e1535be
commit 108b26d6d3

View File

@ -171,7 +171,7 @@ void Calculate(DominatorTreeBaseByGraphTraits<GraphTraits<NodeT>> &DT,
}
}
// Accounting for the virtual exit, see if we had any unreachable nodes
if (Total + 1 != N ) {
if (Total + 1 != N) {
// Make another DFS pass over all other nodes to find the unreachable
// blocks, and find the furthest paths we'll be able to make.
// Note that this looks N^2, but it's really 2N worst case, if every node
@ -194,21 +194,20 @@ void Calculate(DominatorTreeBaseByGraphTraits<GraphTraits<NodeT>> &DT,
ConnectToExitBlock.insert(FurthestAway);
N = ReverseDFSPass<GraphT>(DT, FurthestAway, N);
}
// Finally, now everything should be visited, and anything with parent
// ==
// 0 should be connected to virtual exit.
for (auto *Node : ConnectToExitBlock) {
auto FindResult = DT.Info.find(Node);
assert(FindResult != DT.Info.end() &&
"Everything should have been visited by now");
if (FindResult->second.Parent == 0) {
FindResult->second.Parent = 1;
DT.addRoot(Node);
}
// Finally, now everything should be visited, and anything with parent ==
// 0 should be connected to virtual exit.
for (auto *Node : ConnectToExitBlock) {
auto FindResult = DT.Info.find(Node);
assert(FindResult != DT.Info.end() &&
"Everything should have been visited by now");
if (FindResult->second.Parent == 0) {
FindResult->second.Parent = 1;
DT.addRoot(Node);
}
}
} else {
N = DFSPass<GraphT>(DT, GraphTraits<FuncT *>::getEntryNode(&F), N);
}
} else {
N = DFSPass<GraphT>(DT, GraphTraits<FuncT *>::getEntryNode(&F), N);
}
// When naively implemented, the Lengauer-Tarjan algorithm requires a separate