aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
diff options
context:
space:
mode:
authorAlina Sbirlea <asbirlea@google.com>2020-12-14 11:53:35 -0800
committerAlina Sbirlea <asbirlea@google.com>2021-01-06 14:53:09 -0800
commit63aeaf754a78c67ca3f8343d525dfb7a378dfa9e (patch)
treeb2cf6249cf1542b0026e9c657b68653dc31b5ea4 /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
parentfb1c52852690cb6ad6f7f2a7b5c35bf4d0c56e44 (diff)
downloadllvm-63aeaf754a78c67ca3f8343d525dfb7a378dfa9e.zip
llvm-63aeaf754a78c67ca3f8343d525dfb7a378dfa9e.tar.gz
llvm-63aeaf754a78c67ca3f8343d525dfb7a378dfa9e.tar.bz2
[DominatorTree] Add support for mixed pre/post CFG views.
Add support for mixed pre/post CFG views. Update usages of the MemorySSAUpdater to use the new DT API by requesting the DT updates to be done by the MSSAUpdater. Differential Revision: https://reviews.llvm.org/D93371
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopRotationUtils.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index 68435c2..eb7018c 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -498,12 +498,13 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
Updates.push_back({DominatorTree::Insert, OrigPreheader, Exit});
Updates.push_back({DominatorTree::Insert, OrigPreheader, NewHeader});
Updates.push_back({DominatorTree::Delete, OrigPreheader, OrigHeader});
- DT->applyUpdates(Updates);
if (MSSAU) {
- MSSAU->applyUpdates(Updates, *DT);
+ MSSAU->applyUpdates(Updates, *DT, /*UpdateDT=*/true);
if (VerifyMemorySSA)
MSSAU->getMemorySSA()->verifyMemorySSA();
+ } else {
+ DT->applyUpdates(Updates);
}
}