llvm/mlir/test
River Riddle ea64828a10 [mlir:PDL] Expand how native constraint/rewrite functions can be defined
This commit refactors the expected form of native constraint and rewrite
functions, and greatly reduces the necessary user complexity required when
defining a native function. Namely, this commit adds in automatic processing
of the necessary PDLValue glue code, and allows for users to define
constraint/rewrite functions using the C++ types that they actually want to
use.

As an example, lets see a simple example rewrite defined today:

```
static void rewriteFn(PatternRewriter &rewriter, PDLResultList &results,
                      ArrayRef<PDLValue> args) {
  ValueRange operandValues = args[0].cast<ValueRange>();
  TypeRange typeValues = args[1].cast<TypeRange>();
  ...
  // Create an operation at some point and pass it back to PDL.
  Operation *op = rewriter.create<SomeOp>(...);
  results.push_back(op);
}
```

After this commit, that same rewrite could be defined as:

```
static Operation *rewriteFn(PatternRewriter &rewriter ValueRange operandValues,
                            TypeRange typeValues) {
  ...
  // Create an operation at some point and pass it back to PDL.
  return rewriter.create<SomeOp>(...);
}
```

Differential Revision: https://reviews.llvm.org/D122086
2022-04-06 17:41:59 -07:00
..
Analysis [mlir] Move the Builtin FuncOp to the Func dialect 2022-03-16 17:07:03 -07:00
CAPI [MLIR] Add block detach func to CAPI and use it in Python bindings 2022-04-06 13:11:56 -07:00
Conversion [MLIR] Check for static shape before bare pointer conversion 2022-04-05 17:56:41 +02:00
Dialect [mlir][sparse] replace stack-based access pattern with dyn-alloc 2022-04-06 17:10:43 -07:00
Examples [mlir][toy] Define a FuncOp operation in toy and drop the dependence on FuncOp 2022-03-15 14:55:51 -07:00
Integration [mlir][Vector] Add integration tests for ArmSVE 2022-03-25 13:21:27 +00:00
Interfaces [mlir] Data layout for integer and float types 2022-03-02 14:56:49 +01:00
IR [mlir] Fix leak in case of failed parse 2022-03-28 20:04:31 -07:00
lib [mlir:PDL] Expand how native constraint/rewrite functions can be defined 2022-04-06 17:41:59 -07:00
mlir-cpu-runner [mlir] Add a function to print C-strings to RunnerUtils.cpp. 2022-03-21 13:09:09 +01:00
mlir-linalg-ods-gen [mlir][OpDSL] Add support for adding canonicalization patterns. 2022-03-08 15:56:59 +00:00
mlir-lsp-server [mlir:FunctionOpInterface] Rename the "type" attribute to "function_type" 2022-03-16 17:07:04 -07:00
mlir-opt [mlir] Move the Builtin FuncOp to the Func dialect 2022-03-16 17:07:03 -07:00
mlir-pdll [mlir:PDL] Expand how native constraint/rewrite functions can be defined 2022-04-06 17:41:59 -07:00
mlir-pdll-lsp-server [mlir][PDLL] Add signature help to the PDLL language server 2022-03-19 13:28:24 -07:00
mlir-reduce
mlir-spirv-cpu-runner
mlir-tblgen [mlir][ods] Add description to Attr and ensure doc generation 2022-04-05 10:40:15 +02:00
mlir-translate
mlir-vulkan-runner
Pass [mlir] Allow for using OpPassManager in pass options 2022-04-02 00:45:11 -07:00
python [MLIR] Add block detach func to CAPI and use it in Python bindings 2022-04-06 13:11:56 -07:00
Rewrite [mlir:PDL] Expand how native constraint/rewrite functions can be defined 2022-04-06 17:41:59 -07:00
Target [mlir][LLVMIR] Add vector predication binary intrinsic ops. 2022-04-06 10:48:24 +08:00
Transforms [mlir] Allow for using OpPassManager in pass options 2022-04-02 00:45:11 -07:00
Unit Use lit_config.substitute instead of foo % lit_config.params everywhere 2022-03-16 09:57:41 +01:00
APITest.h
CMakeLists.txt [mlir][Vector] Add integration tests for ArmSVE 2022-03-25 13:21:27 +00:00
lit.cfg.py
lit.site.cfg.py.in [mlir][Vector] Add integration tests for ArmSVE 2022-03-25 13:21:27 +00:00