[mlir][python] Don't emit diagnostics when printing invalid ops
authorRahul Kayaith <rkayaith@gmail.com>
Sat, 25 Feb 2023 08:51:31 +0000 (03:51 -0500)
committerRahul Kayaith <rkayaith@gmail.com>
Mon, 27 Feb 2023 04:50:18 +0000 (23:50 -0500)
commit2aa12583e6ace921a1e58f39d54a35296273758e
tree7349c14cbdad5df5ac375ada9c4ba375a5f5ddfb
parentcf491a165f239abfa7ab9e707f5cbd1861a6cb20
[mlir][python] Don't emit diagnostics when printing invalid ops

The asm printer grew the ability to automatically fall back to the
generic format for invalid ops, so this logic doesn't need to be in the
bindings anymore. The printer already handles supressing diagnostics
that get emitted while checking if the op is valid.

Reviewed By: mehdi_amini, stellaraccident

Differential Revision: https://reviews.llvm.org/D144805
mlir/include/mlir-c/IR.h
mlir/lib/Bindings/Python/IRCore.cpp
mlir/lib/CAPI/IR/IR.cpp
mlir/test/python/ir/operation.py