summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2010-01-16 13:38:07 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2010-01-16 13:38:07 +0000
commitb478d3e0fc818747b735e587b0cd55f84c431072 (patch)
tree3a9a64b2ed7450d4dc1b44d3e5a42b70f1f55dde /llvm/include
parent53da3f8da8decb4ab4c3acf3711e85c8e54f2ba4 (diff)
downloadbcm5719-llvm-b478d3e0fc818747b735e587b0cd55f84c431072.tar.gz
bcm5719-llvm-b478d3e0fc818747b735e587b0cd55f84c431072.zip
Fix PR6047
Nodes that had children outside of the post dominator tree (infinite loops) where removed from the post dominator tree. This seems to be wrong. Leave them in the tree. llvm-svn: 93633
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Analysis/DominatorInternals.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/llvm/include/llvm/Analysis/DominatorInternals.h b/llvm/include/llvm/Analysis/DominatorInternals.h
index 5ecb3481445..8cea96d3560 100644
--- a/llvm/include/llvm/Analysis/DominatorInternals.h
+++ b/llvm/include/llvm/Analysis/DominatorInternals.h
@@ -262,29 +262,17 @@ void Calculate(DominatorTreeBase<typename GraphTraits<NodeT>::NodeType>& DT,
DT.Info[W];
// Step #2: Calculate the semidominators of all vertices
- bool HasChildOutsideDFS = false;
// initialize the semi dominator to point to the parent node
WInfo.Semi = WInfo.Parent;
for (typename GraphTraits<Inverse<NodeT> >::ChildIteratorType CI =
GraphTraits<Inverse<NodeT> >::child_begin(W),
- E = GraphTraits<Inverse<NodeT> >::child_end(W); CI != E; ++CI) {
+ E = GraphTraits<Inverse<NodeT> >::child_end(W); CI != E; ++CI)
if (DT.Info.count(*CI)) { // Only if this predecessor is reachable!
unsigned SemiU = DT.Info[Eval<GraphT>(DT, *CI)].Semi;
if (SemiU < WInfo.Semi)
WInfo.Semi = SemiU;
}
- else {
- // if the child has no DFS number it is not post-dominated by any exit,
- // and so is the current block.
- HasChildOutsideDFS = true;
- }
- }
-
- // if some child has no DFS number it is not post-dominated by any exit,
- // and so is the current block.
- if (DT.isPostDominator() && HasChildOutsideDFS)
- WInfo.Semi = 0;
DT.Info[DT.Vertex[WInfo.Semi]].Bucket.push_back(W);
OpenPOWER on IntegriCloud