[PDLL] Add support for tuple types and expressions
authorRiver Riddle <riddleriver@gmail.com>
Thu, 16 Dec 2021 01:49:29 +0000 (01:49 +0000)
committerRiver Riddle <riddleriver@gmail.com>
Thu, 16 Dec 2021 02:08:13 +0000 (02:08 +0000)
commitf62a57a3f02e03c2eff79d66265e1b0f32dceffa
tree5d0755d26ada703e5cde151f184fdf706c2e8ff0
parent02670c3f385f24789797cde340be60e8ab2447c1
[PDLL] Add support for tuple types and expressions

Tuples are used to group multiple elements into a single
compound value. The values in a tuple can be of any type, and
do not need to be of the same type. There is also no limit to
the number of elements held by a tuple.

Tuples will be used to support multiple results from
Constraints and Rewrites (added in a followup), and will also
make it easier to support more complex primitives (such as
range based maps that can operate on multiple values).

Differential Revision: https://reviews.llvm.org/D115297
mlir/include/mlir/Tools/PDLL/AST/Nodes.h
mlir/include/mlir/Tools/PDLL/AST/Types.h
mlir/lib/Tools/PDLL/AST/Context.cpp
mlir/lib/Tools/PDLL/AST/NodePrinter.cpp
mlir/lib/Tools/PDLL/AST/Nodes.cpp
mlir/lib/Tools/PDLL/AST/TypeDetail.h
mlir/lib/Tools/PDLL/AST/Types.cpp
mlir/lib/Tools/PDLL/Parser/Parser.cpp
mlir/test/mlir-pdll/Parser/expr-failure.pdll
mlir/test/mlir-pdll/Parser/expr.pdll