llvm-project/mlir/docs
Jeff Niu e179532284 [mlir] Remove types from attributes
This patch removes the `type` field from `Attribute` along with the
`Attribute::getType` accessor.

Going forward, this means that attributes in MLIR will no longer have
types as a first-class concept. This patch lays the groundwork to
incrementally remove or refactor code that relies on generic attributes
being typed. The immediate impact will be on attributes that rely on
`Attribute` containing a type, such as `IntegerAttr`,
`DenseElementsAttr`, and `ml_program::ExternAttr`, which will now need
to define a type parameter on their storage classes. This will save
memory as all other attribute kinds will no longer contain a type.

Moreover, it will not be possible to generically query the type of an
attribute directly. This patch provides an attribute interface
`TypedAttr` that implements only one method, `getType`, which can be
used to generically query the types of attributes that implement the
interface. This interface can be used to retain the concept of a "typed
attribute". The ODS-generated accessor for a `type` parameter
automatically implements this method.

Next steps will be to refactor the assembly formats of certain operations
that rely on `parseAttribute(type)` and `printAttributeWithoutType` to
remove special handling of type elision until `type` can be removed from
the dialect parsing hook entirely; and incrementally remove uses of
`TypedAttr`.

Reviewed By: lattner, rriddle, jpienaar

Differential Revision: https://reviews.llvm.org/D130092
2022-07-31 20:01:31 -04:00
..
Bindings [mlir:FunctionOpInterface] Rename the "type" attribute to "function_type" 2022-03-16 17:07:04 -07:00
Dialects [mlir][spirv] Rename spv.GLSL ops to spv.GL. NFC. 2022-07-21 13:03:30 -04:00
Rationale [mlir][NFC] Update textual references of `func` to `func.func` in examples+python scripts 2022-04-20 22:17:26 -07:00
Tools [mlir:LSP] Add a quickfix code action for inserting expected-* diagnostic checks 2022-07-20 15:43:59 -07:00
Tutorials Revert "[MLIR] Generic 'malloc', 'aligned_alloc' and 'free' functions" 2022-07-18 18:07:36 +00:00
includes/img [mlir] Split out a new ControlFlow dialect from Standard 2022-02-06 14:51:16 -08:00
AttributesAndTypes.md [mlir] Remove types from attributes 2022-07-31 20:01:31 -04:00
BufferDeallocationInternals.md [mlir][NFC] Update textual references of `func` to `func.func` in examples+python scripts 2022-04-20 22:17:26 -07:00
Bufferization.md [mlir][bufferize][NFC] Remove BufferizationState 2022-06-17 14:04:11 +02:00
CAPI.md [mlir] support interfaces in Python bindings 2021-10-25 12:50:42 +02:00
CMakeLists.txt
Canonicalization.md [mlir:docs] Add proper documentation for defining dialects 2022-04-11 15:05:57 -07:00
DataLayout.md [mlir][NFC] Fix the tags for various doc code blocks 2022-05-16 16:46:13 -07: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
DefiningDialects.md [mlir][doc] Move documentation of extensible dialects 2022-05-09 16:01:12 -07:00
Diagnostics.md [mlir] Add support for regex within `expected-*` diagnostics 2022-07-11 21:01:30 -07:00
DialectConversion.md [mlir:NFC] Remove the forward declaration of FuncOp in the mlir namespace 2022-04-18 12:01:55 -07:00
Interfaces.md [mlir][NFC] Fix the tags for various doc code blocks 2022-05-16 16:46:13 -07:00
LangRef.md [mlir:Parser] Don't use strings for the "ugly" form of Attribute/Type syntax 2022-07-05 16:20:30 -07:00
OpDefinitions.md [mlir][NFC] Fix the tags for various doc code blocks 2022-05-16 16:46:13 -07:00
PDLL.md [mlir][ods] Make Type- and AttrInterfaces also `Type`s and `Attr`s 2022-07-07 11:54:47 +02:00
PassManagement.md [mlir][docs] Fix pass manager document 2022-07-19 19:52:57 +00:00
Passes.md [mlir][doc] Move pass to passes list and remove redundant doc 2022-06-13 21:01:31 -07:00
PatternRewriter.md [mlir][doc] Fix usage of PatternApplicator. 2022-07-14 09:08:26 +00:00
Quantization.md Fix invalid math formulas in quantization doc 2021-06-01 03:50:59 +00:00
README.txt
SPIRVToLLVMDialectConversion.md [mlir][spirv] Rename spv.GLSL ops to spv.GL. NFC. 2022-07-21 13:03:30 -04:00
ShapeInference.md [mlir][docs] Fix obvious spelling mistakes in documentation 2021-10-29 09:19:11 +02:00
SymbolsAndSymbolTables.md [mlir][NFC] Update textual references of `func` to `func.func` in examples+python scripts 2022-04-20 22:17:26 -07:00
TargetLLVMIR.md [MLIR] Generic 'malloc', 'aligned_alloc' and 'free' functions 2022-07-25 15:52:51 +02:00
Traits.md [mlir] Support verification order (2/3) 2022-02-25 19:04:56 +00:00
doxygen-mainpage.dox
doxygen.cfg.in [mlir] use dynamic sections in MLIR Doxygen 2022-05-13 11:43:52 +02: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.