summaryrefslogtreecommitdiffstats
path: root/mlir/lib/IR/Visitors.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-11-20 10:19:01 -0800
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-11-20 10:45:45 -0800
commiteb418559ef29716cc34c891c93490c38ac5ea1dd (patch)
treebe1e4ac3d32e5df31b8668785ba15f92fe1895a9 /mlir/lib/IR/Visitors.cpp
parent3c055957de7e47e53d3ee8f5ab283cdb5c0ea535 (diff)
downloadbcm5719-llvm-eb418559ef29716cc34c891c93490c38ac5ea1dd.tar.gz
bcm5719-llvm-eb418559ef29716cc34c891c93490c38ac5ea1dd.zip
Add a new OpAsmOpInterface to allow for ops to directly hook into the AsmPrinter.
This interface provides more fine-grained hooks into the AsmPrinter than the dialect interface, allowing for operations to define the asm name to use for results directly on the operations themselves. The hook is also expanded to enable defining named result "groups". Get a special name to use when printing the results of this operation. The given callback is invoked with a specific result value that starts a result "pack", and the name to give this result pack. To signal that a result pack should use the default naming scheme, a None can be passed in instead of the name. For example, if you have an operation that has four results and you want to split these into three distinct groups you could do the following: setNameFn(getResult(0), "first_result"); setNameFn(getResult(1), "middle_results"); setNameFn(getResult(3), ""); // use the default numbering. This would print the operation as follows: %first_result, %middle_results:2, %0 = "my.op" ... PiperOrigin-RevId: 281546873
Diffstat (limited to 'mlir/lib/IR/Visitors.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud