| 3ee44cb7 | 16-Dec-2021 |
River Riddle <[email protected]> |
[PDLL] Add a `rewrite` statement to enable complex rewrites
The `rewrite` statement allows for rewriting a given root operation with a block of nested rewriters. The root operation is not implicitly
[PDLL] Add a `rewrite` statement to enable complex rewrites
The `rewrite` statement allows for rewriting a given root operation with a block of nested rewriters. The root operation is not implicitly erased or replaced, and any transformations to it must be expressed within the nested rewrite block. The inner body may contain any number of other rewrite statements, variables, or expressions.
Differential Revision: https://reviews.llvm.org/D115299
show more ...
|
| f62a57a3 | 16-Dec-2021 |
River Riddle <[email protected]> |
[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 sam
[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
show more ...
|
| 02670c3f | 16-Dec-2021 |
River Riddle <[email protected]> |
[PDLL] Add support for `op` Operation expressions
An operation expression in PDLL represents an MLIR operation. In the match section of a pattern, this expression models one of the input operations
[PDLL] Add support for `op` Operation expressions
An operation expression in PDLL represents an MLIR operation. In the match section of a pattern, this expression models one of the input operations to the pattern. In the rewrite section of a pattern, this expression models one of the operations to create. The general structure of the operation expression is very similar to that of the "generic form" of textual MLIR assembly:
``` let root = op<my_dialect.foo>(operands: ValueRange) {attr = attr: Attr} -> (resultTypes: TypeRange); ```
For now we only model the components that are within PDL, as PDL gains support for blocks and regions so will this expression.
Differential Revision: https://reviews.llvm.org/D115296
show more ...
|
| d7e7fdf3 | 16-Dec-2021 |
River Riddle <[email protected]> |
[PDLL] Add support for literal Attribute and Type expressions
This allows for using literal attributes and types within PDLL, which simplifies building both constraints and rewriters. For example, c
[PDLL] Add support for literal Attribute and Type expressions
This allows for using literal attributes and types within PDLL, which simplifies building both constraints and rewriters. For example, checking if an attribute is true is as simple as `attr<"true">`.
Differential Revision: https://reviews.llvm.org/D115295
show more ...
|