[PATCH] D111611: [NFC] [LoopPeel] Change the way DT is updated for loop exits

Dmitry Makogon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 12 23:21:31 PDT 2021


dmakogon added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/LoopPeel.cpp:891
   // Finally DomtTree must be correct.
-  assert(DT->verify(DominatorTree::VerificationLevel::Fast));
+  if (DTU.hasDomTree())
+    assert(DTU.getDomTree().verify(DominatorTree::VerificationLevel::Fast));
----------------
mkazantsev wrote:
> Lazy DTU will only apply updates when it goes out of scope, or when it flushes. `simplifyLoop` below uses DT and needs it to be up to date. I'd suggest calling `DTU.flush()` here to apply all pending updates and leave assert as is.
Calling DTU.getDomTree flushes all updates to DT


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111611/new/

https://reviews.llvm.org/D111611



More information about the llvm-commits mailing list