[PATCH] D77863: [mlir][ODS] Add support for optional operands and results with a new Optional directive.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 01:35:51 PDT 2020


rriddle created this revision.
rriddle added reviewers: mehdi_amini, jpienaar.
Herald added subscribers: llvm-commits, frgossen, grosul1, bader, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako.
Herald added a reviewer: mravishankar.
Herald added a reviewer: antiagainst.
Herald added a reviewer: antiagainst.
Herald added a project: LLVM.

This revision adds support for specifying operands or results as "optional". This is a special case of variadic where the number of elements is either 0 or 1. Operands and results of this kind will have accessors generated using Value instead of the range types, making it more natural to interface with.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77863

Files:
  mlir/docs/OpDefinitions.md
  mlir/include/mlir/IR/OpBase.td
  mlir/include/mlir/IR/OpImplementation.h
  mlir/include/mlir/TableGen/Argument.h
  mlir/include/mlir/TableGen/Operator.h
  mlir/include/mlir/TableGen/Type.h
  mlir/lib/Parser/Parser.cpp
  mlir/lib/TableGen/Argument.cpp
  mlir/lib/TableGen/Operator.cpp
  mlir/lib/TableGen/Pattern.cpp
  mlir/lib/TableGen/Type.cpp
  mlir/test/lib/Dialect/Test/TestOps.td
  mlir/test/mlir-tblgen/op-decl.td
  mlir/test/mlir-tblgen/op-format-spec.td
  mlir/test/mlir-tblgen/op-format.mlir
  mlir/test/mlir-tblgen/predicate.td
  mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
  mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
  mlir/tools/mlir-tblgen/OpFormatGen.cpp
  mlir/tools/mlir-tblgen/RewriterGen.cpp
  mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77863.256527.patch
Type: text/x-patch
Size: 46773 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200410/60440f73/attachment.bin>


More information about the llvm-commits mailing list