[PATCH] D76205: Add support for custom op parser/printer hooks to know about result names.
Chris Lattner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 15 17:42:35 PDT 2020
lattner created this revision.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a reviewer: rriddle.
Herald added a project: LLVM.
This allows the custom parser/printer hooks to do interesting things with
the SSA names. This patch:
- Adds a new 'getResultName' method to OpAsmParser that allows a parser implementation to get information about its result names.
- Adds a OpAsmPrinter::printOperand overload that takes an explicit stream.
- Adds a test.string_attr_pretty_name operation that uses these hooks to do fancy things with the result name.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76205
Files:
mlir/include/mlir/IR/OpImplementation.h
mlir/lib/IR/AsmPrinter.cpp
mlir/lib/Parser/Parser.cpp
mlir/test/IR/parser.mlir
mlir/test/lib/TestDialect/TestDialect.cpp
mlir/test/lib/TestDialect/TestOps.td
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76205.250447.patch
Type: text/x-patch
Size: 12365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200316/74a35c29/attachment.bin>
More information about the llvm-commits
mailing list