[PATCH] D48923: [Dominators] Add DomTreeUpdater constructor from DT* and PDT*
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 4 11:42:20 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL336294: [Dominators] Add DomTreeUpdater constructor from DT* and PDT* (authored by kuhar, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D48923?vs=154070&id=154143#toc
Repository:
rL LLVM
https://reviews.llvm.org/D48923
Files:
llvm/trunk/include/llvm/IR/DomTreeUpdater.h
llvm/trunk/unittests/IR/DomTreeUpdaterTest.cpp
Index: llvm/trunk/unittests/IR/DomTreeUpdaterTest.cpp
===================================================================
--- llvm/trunk/unittests/IR/DomTreeUpdaterTest.cpp
+++ llvm/trunk/unittests/IR/DomTreeUpdaterTest.cpp
@@ -235,7 +235,8 @@
// Make the DTU.
DominatorTree DT(*F);
- DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy);
+ PostDominatorTree *PDT = nullptr;
+ DomTreeUpdater DTU(&DT, PDT, DomTreeUpdater::UpdateStrategy::Lazy);
ASSERT_TRUE(DTU.hasDomTree());
ASSERT_FALSE(DTU.hasPostDomTree());
ASSERT_EQ(DTU.getUpdateStrategy(), DomTreeUpdater::UpdateStrategy::Lazy);
@@ -323,7 +324,8 @@
// Make the DTU.
DominatorTree DT(*F);
- DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy);
+ PostDominatorTree *PDT = nullptr;
+ DomTreeUpdater DTU(&DT, PDT, DomTreeUpdater::UpdateStrategy::Lazy);
ASSERT_TRUE(DTU.hasDomTree());
ASSERT_FALSE(DTU.hasPostDomTree());
ASSERT_EQ(DTU.getUpdateStrategy(), DomTreeUpdater::UpdateStrategy::Lazy);
@@ -449,7 +451,7 @@
// Make the DTU.
DominatorTree DT(*F);
PostDominatorTree PDT(*F);
- DomTreeUpdater DTU(DT, PDT, DomTreeUpdater::UpdateStrategy::Lazy);
+ DomTreeUpdater DTU(&DT, &PDT, DomTreeUpdater::UpdateStrategy::Lazy);
ASSERT_TRUE(DTU.hasDomTree());
ASSERT_TRUE(DTU.hasPostDomTree());
ASSERT_EQ(DTU.getUpdateStrategy(), DomTreeUpdater::UpdateStrategy::Lazy);
Index: llvm/trunk/include/llvm/IR/DomTreeUpdater.h
===================================================================
--- llvm/trunk/include/llvm/IR/DomTreeUpdater.h
+++ llvm/trunk/include/llvm/IR/DomTreeUpdater.h
@@ -31,11 +31,18 @@
explicit DomTreeUpdater(UpdateStrategy Strategy_) : Strategy(Strategy_) {}
DomTreeUpdater(DominatorTree &DT_, UpdateStrategy Strategy_)
: DT(&DT_), Strategy(Strategy_) {}
+ DomTreeUpdater(DominatorTree *DT_, UpdateStrategy Strategy_)
+ : DT(DT_), Strategy(Strategy_) {}
DomTreeUpdater(PostDominatorTree &PDT_, UpdateStrategy Strategy_)
: PDT(&PDT_), Strategy(Strategy_) {}
+ DomTreeUpdater(PostDominatorTree *PDT_, UpdateStrategy Strategy_)
+ : PDT(PDT_), Strategy(Strategy_) {}
DomTreeUpdater(DominatorTree &DT_, PostDominatorTree &PDT_,
UpdateStrategy Strategy_)
: DT(&DT_), PDT(&PDT_), Strategy(Strategy_) {}
+ DomTreeUpdater(DominatorTree *DT_, PostDominatorTree *PDT_,
+ UpdateStrategy Strategy_)
+ : DT(DT_), PDT(PDT_), Strategy(Strategy_) {}
~DomTreeUpdater() { flush(); }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48923.154143.patch
Type: text/x-patch
Size: 2497 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180704/a617f914/attachment.bin>
More information about the llvm-commits
mailing list