[ODS] Support region names and constraints
authorLei Zhang <antiagainst@google.com>
Thu, 30 May 2019 23:50:16 +0000 (16:50 -0700)
committerMehdi Amini <joker.eph@gmail.com>
Sun, 2 Jun 2019 03:11:42 +0000 (20:11 -0700)
commit3650df50ddf21396cc300c12948d1488baef5ae5
tree5e4dcc9343db56fe4004cf789d0a5d9b3fd2ca26
parent60d6249fbd7873a822b255f5a83608b329c5c4fe
[ODS] Support region names and constraints

    Similar to arguments and results, now we require region definition in ops to
    be specified as a DAG expression with the 'region' operator. This way we can
    specify the constraints for each region and optionally give the region a name.

    Two kinds of region constraints are added, one allowing any region, and the
    other requires a certain number of blocks.

--

PiperOrigin-RevId: 250790211
mlir/include/mlir/IR/OpBase.td
mlir/include/mlir/SPIRV/SPIRVStructureOps.td
mlir/include/mlir/TableGen/Constraint.h
mlir/include/mlir/TableGen/Operator.h
mlir/include/mlir/TableGen/Region.h [new file with mode: 0644]
mlir/lib/TableGen/Constraint.cpp
mlir/lib/TableGen/Operator.cpp
mlir/test/IR/region.mlir
mlir/test/TestDialect/TestOps.td
mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp