[PATCH] D154925: [MLIR][IR] Rewrite OperationVerifier using worklist

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 15:10:35 PDT 2023


alexander-shaposhnikov added inline comments.


================
Comment at: mlir/lib/IR/Verifier.cpp:276
+      if (failed(std::visit(
+              [this](auto *workItem) { return verifyPostChildren(*workItem); },
+              back)))
----------------
mehdi_amini wrote:
> Isn't verifyPostChildren gonna recurse on isolated regions?
correct, it does, however, i kinda thought it could be a rare case that this recursion would blow up (at least it doesn't on the aforementioned tests) + wanted to keep the parallel processing in place.
Basically for the whole thing the hard part was getting the order as close to what we currently have as possible (otherwise we'd need to do a massive update of tests) /  and keeping the code ~simple at the same time,
that's how i landed on the current approach, but I'm open to suggestions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154925



More information about the llvm-commits mailing list