[PATCH] D34296: [Dominators] Don't compute DFS InOut numbers eagerly.
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 16 17:03:47 PDT 2017
kuhar updated this revision to Diff 102909.
kuhar added a comment.
Update tests.
Repository:
rL LLVM
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
@@ -255,8 +255,6 @@
// Free temporary memory used to construct idom's
DT.IDoms.clear();
DT.Info.clear();
-
- DT.updateDFSNumbers();
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34296.102909.patch
Type: text/x-patch
Size: 1669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170617/af284c44/attachment.bin>
More information about the llvm-commits
mailing list