[PATCH] D94827: [SimplifyCFG] Require and preserve dominator tree

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 18 21:11:17 PST 2021


mkazantsev added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp:263
                                 const SimplifyCFGOptions &Options) {
-  assert((!RequireAndPreserveDomTree ||
-          (DT && DT->verify(DominatorTree::VerificationLevel::Full))) &&
----------------
lebedev.ri wrote:
> mkazantsev wrote:
> > Why remove that? It looks useful to have (maybe over-paranoid) checks that DT is correct at least for the first time. I'd rather keep them for a while unless there is a reason to drop them now.
> Note that this checks that the DomTree *provided by the pass manager* is valid.
> Do we actually want to check that here?
This assert is meant to check that we actually pass it a DomTree immediately from the pass manager, and not some previously modified dom tree. It's up to you, but I'm a little bit paranoid when it comes to validation of analysis structures. It's never too late to remove redundant assertions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94827



More information about the llvm-commits mailing list