[PATCH] D34296: [Dominators] Don't compute DFS InOut numbers eagerly.
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 18:25:01 PDT 2017
kuhar updated this revision to Diff 104801.
kuhar added a comment.
Update the diff to apply cleanly.
https://reviews.llvm.org/D34296
Files:
include/llvm/Support/GenericDomTreeConstruction.h
test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
unittests/IR/DominatorTreeTest.cpp
Index: unittests/IR/DominatorTreeTest.cpp
===================================================================
--- unittests/IR/DominatorTreeTest.cpp
+++ unittests/IR/DominatorTreeTest.cpp
@@ -220,6 +220,7 @@
EXPECT_EQ(PostDominatedBBs.size(), 0UL);
// Check DFS Numbers before
+ DT->updateDFSNumbers();
EXPECT_EQ(DT->getNode(BB0)->getDFSNumIn(), 0UL);
EXPECT_EQ(DT->getNode(BB0)->getDFSNumOut(), 7UL);
EXPECT_EQ(DT->getNode(BB1)->getDFSNumIn(), 1UL);
@@ -235,6 +236,7 @@
DT->recalculate(F);
// Check DFS Numbers after
+ DT->updateDFSNumbers();
EXPECT_EQ(DT->getNode(BB0)->getDFSNumIn(), 0UL);
EXPECT_EQ(DT->getNode(BB0)->getDFSNumOut(), 9UL);
EXPECT_EQ(DT->getNode(BB1)->getDFSNumIn(), 1UL);
Index: test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
===================================================================
--- test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
+++ test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
@@ -2,7 +2,7 @@
; RUN: opt < %s -passes='require<domtree>,break-crit-edges,print<domtree>' -disable-output 2>&1| FileCheck %s
; PR932
-; CHECK: [3] %brtrue {1,2}
+; CHECK: [3] %brtrue {{{[0-9]+}},{{[0-9]+}}}
declare void @use1(i32)
Index: include/llvm/Support/GenericDomTreeConstruction.h
===================================================================
--- include/llvm/Support/GenericDomTreeConstruction.h
+++ include/llvm/Support/GenericDomTreeConstruction.h
@@ -277,8 +277,6 @@
DT.DomTreeNodes[W] = IDomNode->addChild(
llvm::make_unique<DomTreeNodeBase<NodeT>>(W, IDomNode));
}
-
- DT.updateDFSNumbers();
}
void doFullDFSWalk(const DomTreeT &DT) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34296.104801.patch
Type: text/x-patch
Size: 1743 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170630/49443f28/attachment.bin>
More information about the llvm-commits
mailing list