[TableGen] Support multiple variadic operands/results
authorLei Zhang <antiagainst@google.com>
Thu, 25 Apr 2019 21:45:37 +0000 (14:45 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 6 May 2019 15:16:54 +0000 (08:16 -0700)
commit6749c21d6ec263891e9bb55a7203f2d2a8bb4d5f
tree42171ccb326dec2a74fc9498f256f5cf07ca677f
parent22ad45a7aa8c5065eca757e518323645d8a7e4f7
[TableGen] Support multiple variadic operands/results

    Certain ops can have multiple variadic operands/results, e.g., `tf.DynamicStitch`.
    Even if an op has only one variadic operand/result, it is not necessarily the
    very last one, e.g., `tf.RaggedGather`. This CL enhances TableGen subsystem to be
    able to represent such cases.

    In order to deduce the operand/result value range for each variadic operand,
    currently we only support variadic operands/results all of the same size.
    So two new traits, `SameVariadicOperandSize` and `SameVariadicResultSize` are
    introduced.

--

PiperOrigin-RevId: 245310628
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/TableGen/Argument.h
mlir/include/mlir/TableGen/Operator.h
mlir/lib/TableGen/Argument.cpp
mlir/lib/TableGen/Operator.cpp
mlir/test/mlir-tblgen/op-builder.td [deleted file]
mlir/test/mlir-tblgen/op-operand.td
mlir/test/mlir-tblgen/op-result.td
mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
mlir/tools/mlir-tblgen/RewriterGen.cpp