[PATCH] D66911: [LoopUnroll] Use Lazy strategy for DTU used for MergeBlockIntoPredecessor.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 18:10:56 PDT 2019
fhahn updated this revision to Diff 217752.
fhahn added a comment.
Add comment that DTU.getDomTree applies the updates to the DomTree.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66911/new/
https://reviews.llvm.org/D66911
Files:
llvm/lib/Transforms/Utils/LoopUnroll.cpp
Index: llvm/lib/Transforms/Utils/LoopUnroll.cpp
===================================================================
--- llvm/lib/Transforms/Utils/LoopUnroll.cpp
+++ llvm/lib/Transforms/Utils/LoopUnroll.cpp
@@ -870,7 +870,7 @@
assert(!DT || !UnrollVerifyDomtree ||
DT->verify(DominatorTree::VerificationLevel::Fast));
- DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Eager);
+ DomTreeUpdater DTU(DT, DomTreeUpdater::UpdateStrategy::Lazy);
// Merge adjacent basic blocks, if possible.
for (BasicBlock *Latch : Latches) {
BranchInst *Term = dyn_cast<BranchInst>(Latch->getTerminator());
@@ -890,6 +890,8 @@
}
}
}
+ // Apply updates to the DomTree.
+ DT = &DTU.getDomTree();
// At this point, the code is well formed. We now simplify the unrolled loop,
// doing constant propagation and dead code elimination as we go.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66911.217752.patch
Type: text/x-patch
Size: 877 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190829/30d349e9/attachment.bin>
More information about the llvm-commits
mailing list