[all-commits] [llvm/llvm-project] aba1ac: [mlir][ODS] Add support for optional operands and ...

River Riddle via All-commits all-commits at lists.llvm.org
Fri Apr 10 14:18:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: aba1acc89c653b2cc08cccfb754ff16994a05332
      https://github.com/llvm/llvm-project/commit/aba1acc89c653b2cc08cccfb754ff16994a05332
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-04-10 (Fri, 10 Apr 2020)

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

  Log Message:
  -----------
  [mlir][ODS] Add support for optional operands and results with a new Optional directive.

Summary: 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.

Differential Revision: https://reviews.llvm.org/D77863




More information about the All-commits mailing list