This patch changes the printer to print a comment when an op fails to
verify.
func @foo() { // Verification failed, printing generic form "test.invalid_op"() : () -> () return }
The verification of the op is done lazily instead.
Fixes #57435
Paths
| Differential D132963
[mlir] Print a comment when printing an op that failed to verify AbandonedPublic Authored by Mogball on Aug 30 2022, 11:49 AM.
Details
Summary This patch changes the printer to print a comment when an op fails to func @foo() { // Verification failed, printing generic form "test.invalid_op"() : () -> () return } The verification of the op is done lazily instead. Fixes #57435
Diff Detail
Event TimelineThis revision now requires changes to proceed.Aug 30 2022, 11:53 AM Comment Actions I would also rather have the comment at the top of the IR dump anyways, otherwise it's going to be difficult to spot if the dump is non-trivial.
Revision Contents
Diff 456742 mlir/include/mlir-c/IR.h
mlir/lib/Bindings/Python/IRCore.cpp
mlir/lib/CAPI/IR/IR.cpp
mlir/lib/IR/AsmPrinter.cpp
mlir/test/IR/print-ir-invalid.mlir
|
This is going to run on every single operation (which in turn will recursively verify), we should not be doing that. AsmState is still the right place to do verification.