[PATCH] D75865: Introduce unify-loop-exits pass.

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 17 10:44:24 PDT 2020


sameerds marked an inline comment as done.
sameerds added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/UnifyLoopExits.cpp:174-191
+#if defined(EXPENSIVE_CHECKS)
+  assert(DT.verify(DominatorTree::VerificationLevel::Full));
+#else
+  assert(DT.verify(DominatorTree::VerificationLevel::Fast));
+#endif
+  L->verifyLoop();
+
----------------
arsenm wrote:
> Won't the verifier catch these after the pass anyway?
> 
> If not I think the all the verification calls should be moved to a separate function
This verification happens immediately after each loop is transformed, which is useful for reporting errors closer to where they occur. If we move the verification out of this function, the outer loop that calls this function could end up working on an invalid loop structure, and the errors reported would not be very useful.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75865





More information about the llvm-commits mailing list