[mlir][NFC] Make 'printOp' public in AsmPrinter
authorDiego Caballero <diegocaballero@google.com>
Wed, 5 Oct 2022 18:31:22 +0000 (18:31 +0000)
committerDiego Caballero <diegocaballero@google.com>
Wed, 5 Oct 2022 19:00:53 +0000 (19:00 +0000)
commit2cdd246a39076379b1678782f99872f918fa358c
tree41fe572e50b375b6cd157744b3949a3b2befdc71
parent6ea83fc98fd120066c3c42d88c5517ab811152bc
[mlir][NFC] Make 'printOp' public in AsmPrinter

This patch moves the 'printOp' functionality to the public API of
AsmPrinter and rename it to 'printCustomOrGenericOp'. No 'parseOp'
is needed at this time as existing APIs are able to parse operations
producing results where results are omitted in the textual form
(the LHS of an operation is redundant when it comes to building the
operation itself as it only contains the result names).

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D135006
mlir/include/mlir/IR/OpImplementation.h
mlir/lib/IR/AsmPrinter.cpp
mlir/test/IR/print-op-custom-or-generic.mlir [new file with mode: 0644]
mlir/test/IR/print-op-generic.mlir [deleted file]