[mlir][ir] Custom ops' parse/print fall back to dialect hooks
authorMogball <jeffniu22@gmail.com>
Fri, 10 Dec 2021 00:47:48 +0000 (00:47 +0000)
committerMogball <jeffniu22@gmail.com>
Fri, 10 Dec 2021 19:34:25 +0000 (19:34 +0000)
commit0845635eda428173861fa1a4dd3de014b595daf7
tree162248f963eb040fd67a8765623d75e66301c10e
parent7c8f4e7b85ed98497f37571d72609f39a8eed447
[mlir][ir] Custom ops' parse/print fall back to dialect hooks

Custom ops that have no parser or printer should fall back to the dialect's parser and/or printer hooks. This avoids the need to define parsers and printers that simply dispatch to the dialect hook.

Reviewed By: mehdi_amini, rriddle

Differential Revision: https://reviews.llvm.org/D115481
mlir/include/mlir/IR/OpDefinition.h
mlir/lib/IR/Operation.cpp
mlir/test/IR/parser.mlir
mlir/test/lib/Dialect/Test/TestDialect.cpp
mlir/test/lib/Dialect/Test/TestOps.td