[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
Fri Mar 20 11:55:33 PDT 2020


lattner updated this revision to Diff 251711.
lattner added a comment.

Fix a bug that Mehdi noticed in patch review in getResultName().  Expand
the testcase to handle and show the multiresult case explicitly, testing
the fix.  Add a new OpAsmParser::getNumResults() method.

The later allows ops with variadic results to know how many they have, which
seems like a widely useful thing.  IIRC, something in TFRT had to have an
explicit result count passed in as an attribute because we didn't have this
before.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76205/new/

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.251711.patch
Type: text/x-patch
Size: 13950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200320/88395842/attachment.bin>


More information about the llvm-commits mailing list