llvm-project/mlir/docs
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
..
Bindings [mlir:FunctionOpInterface] Rename the "type" attribute to "function_type" 2022-03-16 17:07:04 -07:00
Dialects [mlir][emitc] Adapt to move of FuncOp 2022-03-28 17:44:47 +02:00
Rationale [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
Tools [mlir][docs] Fix obvious spelling mistakes in documentation 2021-10-29 09:19:11 +02:00
Tutorials [mlir] Rename `OpAsmParser::OperandType` to `OpAsmParser::UnresolvedOperand` 2022-03-21 21:42:13 +01:00
includes/img [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
AttributesAndTypes.md [mlir] Rewrite and modernize the documentation for defining Attributes/Types 2022-03-15 00:19:52 -07:00
BufferDeallocationInternals.md [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
Bufferization.md [mlir][bufferize] Update documentation with allow-return-allocs 2022-03-16 23:30:09 +09:00
CAPI.md [mlir] support interfaces in Python bindings 2021-10-25 12:50:42 +02:00
CMakeLists.txt Remove CMake configuration for Sphinx targets in MLIR 2020-03-12 01:28:38 +00:00
Canonicalization.md Clarify that fold() can't "erase" an operation in the MLIR Canonicalization doc (NFC) 2022-01-13 18:43:18 +00:00
DataLayout.md [mlir][NFC] Replace references to Identifier with StringAttr 2021-11-16 17:36:26 +00:00
DebugActions.md [mlir][doc] Fix links and references in top level docs directory 2021-05-24 18:43:00 +02:00
DeclarativeRewrites.md [mlir-tblgen] Support `either` in Tablegen DRR. 2021-11-08 23:16:03 +00:00
Diagnostics.md [mlir] Fix dumping invalid ops 2022-03-07 08:32:31 -08:00
DialectConversion.md [mlir] Rename the Standard dialect to the Func dialect 2022-03-01 12:10:04 -08:00
Interfaces.md [mlir] Add isa/dyn_cast support for dialect interfaces 2022-01-31 19:24:34 -08:00
LangRef.md [MLIR] Add nested symbols into LangRef 2022-04-04 22:06:19 +05:30
OpDefinitions.md [mlir][ods] Add Deprecate helper 2022-03-22 11:08:36 -07:00
PDLL.md [mlir:PDL] Expand how native constraint/rewrite functions can be defined 2022-04-06 17:41:59 -07:00
PassManagement.md [mlir:PassOption] Rework ListOption parsing and add support for std::vector/SmallVector options 2022-04-02 00:45:11 -07:00
Passes.md [mlir] Rename the Standard dialect to the Func dialect 2022-03-01 12:10:04 -08:00
PatternRewriter.md [mlir:PassOption] Rework ListOption parsing and add support for std::vector/SmallVector options 2022-04-02 00:45:11 -07:00
Quantization.md Fix invalid math formulas in quantization doc 2021-06-01 03:50:59 +00:00
README.txt
SPIRVToLLVMDialectConversion.md [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
ShapeInference.md [mlir][docs] Fix obvious spelling mistakes in documentation 2021-10-29 09:19:11 +02:00
SymbolsAndSymbolTables.md [mlir] Move the Builtin FuncOp to the Func dialect 2022-03-16 17:07:03 -07:00
TargetLLVMIR.md [mlir] Move the Builtin FuncOp to the Func dialect 2022-03-16 17:07:03 -07:00
Traits.md [mlir] Support verification order (2/3) 2022-02-25 19:04:56 +00:00
doxygen-mainpage.dox
doxygen.cfg.in [NFC] Inclusive Language: change master to main for .chm files 2021-11-08 08:23:04 -06:00

README.txt

MLIR documentation
==================

Please note mlir.llvm.org is where MLIR's rendered documentation is displayed.
The viewing experience on GitHub or elsewhere may not match those of the
website. For any changes please verify instead that they work on the main
website first.

See https://github.com/llvm/mlir-www for the website generation information.