[Mlir-commits] [mlir] Add options to generate-runtime-verification to enable faster pass running (PR #160331)
Hanchenng Wu
llvmlistbot at llvm.org
Tue Sep 30 07:01:07 PDT 2025
================
@@ -36,10 +44,46 @@ void GenerateRuntimeVerificationPass::runOnOperation() {
ops.push_back(verifiableOp);
});
+ // Create error message generator based on verboseLevel
----------------
HanchengWu wrote:
Hi Mehdi,
Thanks for your guidance. I'm relatively new to LLVM/MLIR and have a question about AsmState usage in op->print().
Looking at the current implementation, the pass first collects all RuntimeVerifiableOpInterface ops to avoid generating verification for IR that itself performs verification. Then it iterates through these ops, generating verification code for each.
My concern/puzzle is about SSA name state consistency: since each call to generateRuntimeVerification() modifies the IR by injecting verification code, the SSA name mappings may become stale between errorMsgGenerator invocations. My understanding is that AsmState/SSANameState needs to be reconstructed after IR modifications to maintain accurate SSA name printing.
Again, I could be wrong, and there might be ways to reuse ArmState. Let me know what you think, and I can give it a try.
https://github.com/llvm/llvm-project/pull/160331
More information about the Mlir-commits
mailing list