|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
9f186bb1 |
| 06-Jul-2022 |
Markus Böck <[email protected]> |
[mlir][ods] Make Type- and AttrInterfaces also `Type`s and `Attr`s
By making TypeInterfaces and AttrInterfaces, Types and Attrs respectively it'd then be possible to use them anywhere where a Type o
[mlir][ods] Make Type- and AttrInterfaces also `Type`s and `Attr`s
By making TypeInterfaces and AttrInterfaces, Types and Attrs respectively it'd then be possible to use them anywhere where a Type or Attr may go. That is within the arguments and results of an Op definition, in a RewritePattern etc.
Prior to this change users had to separately define a Type or Attr, with a predicate to check whether a type or attribute implements a given interface. Such code will be redundant now. Removing such occurrences in upstream dialects will be part of a separate patch.
As part of implementing this patch, slight refactoring had to be done. In particular, Interfaces cppClassName field was renamed to cppInterfaceName as it "clashed" with TypeConstraints cppClassName. In particular Interfaces cppClassName expected just the class name, without any namespaces, while TypeConstraints cppClassName expected a fully qualified class name.
Differential Revision: https://reviews.llvm.org/D129209
show more ...
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4 |
|
| #
bf352e0b |
| 03-May-2022 |
River Riddle <[email protected]> |
[mlir:PDLL] Add better support for providing Constraint/Pattern/Rewrite documentation
This commit enables providing long-form documentation more seamlessly to the LSP by revamping decl documentation
[mlir:PDLL] Add better support for providing Constraint/Pattern/Rewrite documentation
This commit enables providing long-form documentation more seamlessly to the LSP by revamping decl documentation. For ODS imported constructs, we now also import descriptions and attach them to decls when possible. For PDLL constructs, the LSP will now try to provide documentation by parsing the comments directly above the decls location within the source file. This commit also adds a new parser flag `enableDocumentation` that gates the import and attachment of ODS documentation, which is unnecessary in the normal build process (i.e. it should only be used/consumed by tools).
Differential Revision: https://reviews.llvm.org/D124881
show more ...
|
| #
1c2edb02 |
| 03-May-2022 |
River Riddle <[email protected]> |
[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. Thi
[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
show more ...
|
| #
0429472e |
| 30-Apr-2022 |
River Riddle <[email protected]> |
[mlir:PDLL] Fix signature help for operation operands
We were currently only completing on the first operand because the completion check was outside of the parse loop.
Differential Revision: https
[mlir:PDLL] Fix signature help for operation operands
We were currently only completing on the first operand because the completion check was outside of the parse loop.
Differential Revision: https://reviews.llvm.org/D124784
show more ...
|
| #
91b8d96f |
| 30-Apr-2022 |
River Riddle <[email protected]> |
[mlir:PDLL] Add proper support for operation result type inference
This allows for the results of operations to be inferred in certain contexts, and matches the support in PDL for result type infere
[mlir:PDLL] Add proper support for operation result type inference
This allows for the results of operations to be inferred in certain contexts, and matches the support in PDL for result type inference. The main two initial circumstances are when used as a replacement of another operation, or when the operation being created implements InferTypeOpInterface.
Differential Revision: https://reviews.llvm.org/D124782
show more ...
|
| #
c088fbe7 |
| 25-May-2022 |
Chia-hung Duan <[email protected]> |
[mlir][PDLL] Allow numeric result indexing for unregistered op
If we don't specify the result index while matching operand with the result of certain operation, it's supposed to match all the result
[mlir][PDLL] Allow numeric result indexing for unregistered op
If we don't specify the result index while matching operand with the result of certain operation, it's supposed to match all the results of the operation with the operand. For registered op, it's easy to do that by either indexing with number or name. For unregistered op, this commit enables the numeric result indexing for this use case.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D126330
show more ...
|
| #
6d4471ef |
| 18-May-2022 |
River Riddle <[email protected]> |
[mlir:PDLL] Improve the location ranges of several expressions during parsing
This allows for the range to encompass more of the source associated with the full expression, making diagnostics easier
[mlir:PDLL] Improve the location ranges of several expressions during parsing
This allows for the range to encompass more of the source associated with the full expression, making diagnostics easier to see/tooling easier/etc.
show more ...
|
| #
5a9a438a |
| 07-May-2022 |
River Riddle <[email protected]> |
[TableGen] Refactor TableGenParseFile to no longer use a callback
Now that TableGen no longer relies on global Record state, we can allow for the client to own the RecordKeeper and SourceMgr. Given
[TableGen] Refactor TableGenParseFile to no longer use a callback
Now that TableGen no longer relies on global Record state, we can allow for the client to own the RecordKeeper and SourceMgr. Given that TableGen internally still relies on the global llvm::SrcMgr, this method unfortunately still isn't thread-safe.
Differential Revision: https://reviews.llvm.org/D125277
show more ...
|
|
Revision tags: llvmorg-14.0.3 |
|
| #
651d9f70 |
| 26-Apr-2022 |
River Riddle <[email protected]> |
[mlir:PDLL] Fix the import of native constraints from ODS
We weren't properly returning the result of the constraint, which leads to errors when actually trying to use the generated C++.
Differenti
[mlir:PDLL] Fix the import of native constraints from ODS
We weren't properly returning the result of the constraint, which leads to errors when actually trying to use the generated C++.
Differential Revision: https://reviews.llvm.org/D124586
show more ...
|
| #
ebb1e900 |
| 26-Apr-2022 |
River Riddle <[email protected]> |
[mlir:PDLL] Fix error handling of eof within a string literal
We currently aren't handling this properly, and in the case of a string block just crash. This commit adds proper error handling and det
[mlir:PDLL] Fix error handling of eof within a string literal
We currently aren't handling this properly, and in the case of a string block just crash. This commit adds proper error handling and detection for eof.
Differential Revision: https://reviews.llvm.org/D124585
show more ...
|
|
Revision tags: llvmorg-14.0.2 |
|
| #
41d2c6df |
| 20-Apr-2022 |
River Riddle <[email protected]> |
[mlir][PDLL-LSP] Add code completion for include file paths
This allows for providing completion results for include directive file paths by searching the set of include directories for the current
[mlir][PDLL-LSP] Add code completion for include file paths
This allows for providing completion results for include directive file paths by searching the set of include directories for the current file.
Differential Revision: https://reviews.llvm.org/D124112
show more ...
|
| #
09af7fef |
| 20-Apr-2022 |
River Riddle <[email protected]> |
[mlir][PDLL] Add document link and hover support to mlir-pdll-lsp-server
This allows for navigating to included files on click, and also provides hover information about the include file (similarly
[mlir][PDLL] Add document link and hover support to mlir-pdll-lsp-server
This allows for navigating to included files on click, and also provides hover information about the include file (similarly to clangd).
Differential Revision: https://reviews.llvm.org/D124077
show more ...
|
| #
b3fc0fa8 |
| 20-Apr-2022 |
River Riddle <[email protected]> |
[mlir][PDLL] Don't use the result of `Constraint::getDefName()` when uniquing
In the case of anonymous defs this may return the name of the base def class, which can lead to two different defs with
[mlir][PDLL] Don't use the result of `Constraint::getDefName()` when uniquing
In the case of anonymous defs this may return the name of the base def class, which can lead to two different defs with the same name (which hits an assert). This commit adds a new `getUniqueDefName` method that returns a unique name for the constraint.
Differential Revision: https://reviews.llvm.org/D124074
show more ...
|
|
Revision tags: llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4 |
|
| #
469c5894 |
| 11-Mar-2022 |
River Riddle <[email protected]> |
[mlir][PDLL] Add signature help to the PDLL language server
This commit adds signature support to the language server, and initially supports providing help for: operation operands and results, and
[mlir][PDLL] Add signature help to the PDLL language server
This commit adds signature support to the language server, and initially supports providing help for: operation operands and results, and constraint/rewrite calls.
Differential Revision: https://reviews.llvm.org/D121545
show more ...
|
| #
008de486 |
| 11-Mar-2022 |
River Riddle <[email protected]> |
[mlir][PDLL] Add code completion to the PDLL language server
This commit adds code completion support to the language server, and initially supports providing completions for: Member access, attribu
[mlir][PDLL] Add code completion to the PDLL language server
This commit adds code completion support to the language server, and initially supports providing completions for: Member access, attributes/constraint/dialect/operation names, and pattern metadata.
Differential Revision: https://reviews.llvm.org/D121544
show more ...
|
|
Revision tags: llvmorg-14.0.0-rc3 |
|
| #
671e30a1 |
| 07-Mar-2022 |
Mehdi Amini <[email protected]> |
Apply clang-tidy fixes for modernize-use-default-member-init to MLIR (NFC)
|
|
Revision tags: llvmorg-14.0.0-rc2 |
|
| #
81f2f4df |
| 15-Feb-2022 |
River Riddle <[email protected]> |
[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 opera
[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
show more ...
|
| #
b474ca1d |
| 14-Feb-2022 |
River Riddle <[email protected]> |
[PDLL] Properly error out on returning results from native constraints
PDL currently doesn't support result values from constraints, meaning we need to error out until this is actually supported to
[PDLL] Properly error out on returning results from native constraints
PDL currently doesn't support result values from constraints, meaning we need to error out until this is actually supported to avoid crashes.
Differential Revision: https://reviews.llvm.org/D119782
show more ...
|
| #
a486cf5e |
| 14-Feb-2022 |
River Riddle <[email protected]> |
[mlir:PDLL] Fix handling of unspecified operands/results on operation expressions
If the operand list or result list of an operation expression is not specified, we interpret this as meaning that th
[mlir:PDLL] Fix handling of unspecified operands/results on operation expressions
If the operand list or result list of an operation expression is not specified, we interpret this as meaning that the operands/results are "unconstraint" (i.e. "could be anything"). We currently don't properly handle differentiating this case from the case of "no operands/results". This commit adds the insertion of implicit value/type range variables when these lists are unspecified. This allows for adding proper support for when zero operands or results are expected.
Differential Revision: https://reviews.llvm.org/D119780
show more ...
|
| #
ceb5dc55 |
| 11-Feb-2022 |
River Riddle <[email protected]> |
[PDLL] Attempt to fix the gcc5 build by adding this-> to auto lambda
|
|
Revision tags: llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
faf42264 |
| 02-Jan-2022 |
River Riddle <[email protected]> |
[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 stru
[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
show more ...
|
| #
3d8b9060 |
| 02-Jan-2022 |
River Riddle <[email protected]> |
[PDLL] Add support for single line lambda-like patterns
This allows for defining simple patterns in a single line. The lambda body of a Pattern expects a single operation rewrite statement:
``` Pat
[PDLL] Add support for single line lambda-like patterns
This allows for defining simple patterns in a single line. The lambda body of a Pattern expects a single operation rewrite statement:
``` Pattern => replace op<my_dialect.foo>(operands: ValueRange) with operands; ```
Differential Revision: https://reviews.llvm.org/D115835
show more ...
|
| #
6842ec42 |
| 26-Jan-2022 |
River Riddle <[email protected]> |
[mlir][NFC] Add a using for llvm::SMLoc/llvm::SMRange to LLVM.h
These are used pervasively during parsing.
Differential Revision: https://reviews.llvm.org/D118291
|
| #
02b6fb21 |
| 20-Dec-2021 |
Mehdi Amini <[email protected]> |
Fix clang-tidy issues in mlir/ (NFC)
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D115956
|
| #
e76043ac |
| 16-Dec-2021 |
River Riddle <[email protected]> |
[PDLL] Fix GCC5 build after D115093
|