From 108b26d6d380e269ea297a941687f9189013a3b9 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Wed, 1 Mar 2017 02:50:46 +0000 Subject: [PATCH] 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 --- .../llvm/Support/GenericDomTreeConstruction.h | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/include/llvm/Support/GenericDomTreeConstruction.h b/include/llvm/Support/GenericDomTreeConstruction.h index 9d84bc62c93..068adc888bc 100644 --- a/include/llvm/Support/GenericDomTreeConstruction.h +++ b/include/llvm/Support/GenericDomTreeConstruction.h @@ -171,7 +171,7 @@ void Calculate(DominatorTreeBaseByGraphTraits> &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> &DT, ConnectToExitBlock.insert(FurthestAway); N = ReverseDFSPass(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(DT, GraphTraits::getEntryNode(&F), N); + } + } else { + N = DFSPass(DT, GraphTraits::getEntryNode(&F), N); } // When naively implemented, the Lengauer-Tarjan algorithm requires a separate