forked from OSchip/llvm-project
![]() Declarative attribute and type formats with assembly formats. Define an `assemblyFormat` field in attribute and type defs with a `mnemonic` to generate a parser and printer. ```tablegen def MyAttr : AttrDef<MyDialect, "MyAttr"> { let parameters = (ins "int64_t":$count, "AffineMap":$map); let mnemonic = "my_attr"; let assemblyFormat = "`<` $count `,` $map `>`"; } ``` Use `struct` to define a comma-separated list of key-value pairs: ```tablegen def MyType : TypeDef<MyDialect, "MyType"> { let parameters = (ins "int":$one, "int":$two, "int":$three); let mnemonic = "my_attr"; let assemblyFormat = "`<` $three `:` struct($one, $two) `>`"; } ``` Use `struct(*)` to capture all parameters. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D111594 |
||
---|---|---|
.. | ||
Bindings | ||
Dialects | ||
Rationale | ||
Tools | ||
Tutorials | ||
includes/img | ||
BufferDeallocationInternals.md | ||
Bufferization.md | ||
CAPI.md | ||
CMakeLists.txt | ||
Canonicalization.md | ||
DataLayout.md | ||
DebugActions.md | ||
DeclarativeRewrites.md | ||
Diagnostics.md | ||
DialectConversion.md | ||
Interfaces.md | ||
LangRef.md | ||
OpDefinitions.md | ||
PassManagement.md | ||
Passes.md | ||
PatternRewriter.md | ||
Quantization.md | ||
README.txt | ||
SPIRVToLLVMDialectConversion.md | ||
ShapeInference.md | ||
SymbolsAndSymbolTables.md | ||
TargetLLVMIR.md | ||
Traits.md | ||
doxygen-mainpage.dox | ||
doxygen.cfg.in |
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.