| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[PDLL] Add support for tablegen includes and importing ODS information This commit adds support for processing tablegen include files, and importing various information from ODS. This includes operations, attribute+type constraints, attribute/operation/type interfaces, etc. This will allow for much more robust tooling, and also allows for referencing ODS constructs directly within PDLL (imported interfaces can be used as constraints, operation result names can be used for member access, etc). Differential Revision: https://reviews.llvm.org/D119900 | 4 年前 | |
[PDLL] Add support for tablegen includes and importing ODS information This commit adds support for processing tablegen include files, and importing various information from ODS. This includes operations, attribute+type constraints, attribute/operation/type interfaces, etc. This will allow for much more robust tooling, and also allows for referencing ODS constructs directly within PDLL (imported interfaces can be used as constraints, operation result names can be used for member access, etc). Differential Revision: https://reviews.llvm.org/D119900 | 4 年前 | |
[mlir][PDLL] Add an initial frontend for PDLL This is a new pattern rewrite frontend designed from the ground up to support MLIR constructs, and to target PDL. This frontend language was proposed in https://llvm.discourse.group/t/rfc-pdll-a-new-declarative-rewrite-frontend-for-mlir/4798 This commit starts sketching out the base structure of the frontend, and is intended to be a minimal starting point for building up the language. It essentially contains support for defining a pattern, variables, and erasing an operation. The features mentioned in the proposal RFC (including IDE support) will be added incrementally in followup commits. I intend to upstream the documentation for the language in a followup when a bit more of the pieces have been landed. Differential Revision: https://reviews.llvm.org/D115093 | 4 年前 | |
[PDLL] Add support for user defined constraint and rewrite functions These functions allow for defining pattern fragments usable within the match and rewrite sections of a pattern. The main structure of Constraints and Rewrites functions are the same, and are similar to functions in other languages; they contain a signature (i.e. name, argument list, result list) and a body: pdll // Constraint that takes a value as an input, and produces a value: Constraint Cst(arg: Value) -> Value { ... } // Constraint that returns multiple values: Constraint Cst() -> (result1: Value, result2: ValueRange); When returning multiple results, each result can be optionally be named (the result of a Constraint/Rewrite in the case of multiple results is a tuple). These body of a Constraint/Rewrite functions can be specified in several ways: * Externally In this case we are importing an external function (registered by the user outside of PDLL): pdll Constraint Foo(op: Op); Rewrite Bar(); * In PDLL (using PDLL constructs) In this case, the body is defined using PDLL constructs: pdll Rewrite BuildFooOp() { // The result type of the Rewrite is inferred from the return. return op<my_dialect.foo>; } // Constraints/Rewrites can also implement a lambda/expression // body for simple one line bodies. Rewrite BuildFooOp() => op<my_dialect.foo>; * In PDLL (using a native/C++ code block) In this case the body is specified using a C++(or potentially other language at some point) code block. When building PDLL in AOT mode this will generate a native constraint/rewrite and register it with the PDL bytecode. pdll Rewrite BuildFooOp() -> Op<my_dialect.foo> [{ return rewriter.create<my_dialect::FooOp>(...); }]; Differential Revision: https://reviews.llvm.org/D115836 | 4 年前 | |
[mlir] (NFC) run clang-format on all files | 3 年前 | |
[mlir:PDLL] Rework the C++ generation of native Constraint/Rewrite arguments and results The current translation uses the old "ugly"/"raw" form which used PDLValue for the arguments and results. This commit updates the C++ generation to use the recently added sugar that allows for directly using the desired types for the arguments and result of PDL functions. In addition, this commit also properly imports the C++ class for ODS operations, constraints, and interfaces. This allows for a much more convienent C++ API than previously granted with the raw/low-level types. Differential Revision: https://reviews.llvm.org/D124817 | 4 年前 | |
Use value_or instead of getValueOr (NFC) | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 3 年前 | ||
| 4 年前 | ||
| 3 年前 |