llvm-project/mlir/docs
Chris Lattner 9eb3e564d3 [ODS] Make the getType() method on a OneResult instruction return a specific type.
Implement Bug 46698, making ODS synthesize a getType() method that returns a
specific C++ class for OneResult methods where we know that class.  This eliminates
a common source of casts in things like:

   myOp.getType().cast<FIRRTLType>().getPassive()

because we know that myOp always returns a FIRRTLType.  This also encourages
op authors to type their results more tightly (which is also good for
verification).

I chose to implement this by splitting the OneResult trait into itself plus a
OneTypedResult trait, given that many things are using `hasTrait<OneResult>`
to conditionalize various logic.

While this changes makes many many ops get more specific getType() results, it
is generally drop-in compatible with the previous behavior because 'x.cast<T>()'
is allowed when x is already known to be a T.  The one exception to this is that
we need declarations of the types used by ops, which is why a couple headers
needed additional #includes.

I updated a few things in tree to remove the now-redundant `.cast<>`'s, but there
are probably many more than can be removed.

Differential Revision: https://reviews.llvm.org/D93790
2020-12-26 13:52:40 -08:00
..
Bindings [mlir][Python] Support finding pybind11 from the python environment. 2020-11-22 12:52:01 -08:00
Dialects [mlir][spirv] NFC: rename SPIR-V conversion files for consistency 2020-12-23 14:36:46 -05:00
Rationale [mlir] Add section page for Rationale docs. 2020-12-14 14:49:30 -08:00
Tutorials [ODS] Make the getType() method on a OneResult instruction return a specific type. 2020-12-26 13:52:40 -08:00
includes/img [MLIR] Added documentation and manual to use bufferization features. 2020-11-12 10:43:05 +01:00
Bufferization.md [MLIR] Added documentation and manual to use bufferization features. 2020-11-12 10:43:05 +01:00
CAPI.md [mlir][Attributes][NFC] Move all builtin Attribute classes to BuiltinAttributes.h 2020-12-03 18:02:11 -08:00
CMakeLists.txt Remove CMake configuration for Sphinx targets in MLIR 2020-03-12 01:28:38 +00:00
Canonicalization.md Merge OpFolderDialectInterface with DialectFoldInterface (NFC) 2020-08-13 00:39:22 +00:00
ConversionToLLVMDialect.md [mlir] Modernize std-to-llvm operation conversion doc 2020-12-23 11:19:58 +01:00
DeclarativeRewrites.md [mlir] Simplify DDR matching patterns with equal operands for operators where it's applicable. Added documentation. 2020-10-21 21:31:39 +00:00
Diagnostics.md [Support] Move LLD's parallel algorithm wrappers to support 2020-05-05 15:21:05 -07:00
DialectConversion.md [mlir][doc] Correct method names in DialectConversion.md to match the code. 2020-12-02 00:04:07 -08:00
EDSC.md [mlir] Change dialect namespace loop->scf 2020-05-13 19:20:21 +02:00
Interfaces.md [mlir][Interfaces] Tidy up the documentation for interfaces 2020-12-09 15:34:07 -08:00
LLVMDialectMemRefConvention.md [mlir] Modernize std-to-llvm operation conversion doc 2020-12-23 11:19:58 +01:00
LangRef.md [mlir][Attributes][NFC] Move all builtin Attribute classes to BuiltinAttributes.h 2020-12-03 18:02:11 -08:00
OpDefinitions.md [mlir] Remove the MutableDictionaryAttr class 2020-12-17 17:18:42 -08:00
PassManagement.md [mlir][docs] Tidy up the pass infrastructure documentation 2020-12-11 17:53:33 -08:00
Passes.md [mlir] Add tensor passes to passes.md 2020-12-23 16:13:03 -08:00
PatternRewriter.md [MLIR][Docs] Fix a small typo in documentation. 2020-12-21 22:30:22 +01:00
Quantization.md [mlir][NFC] Remove usernames and google bug numbers from TODO comments. 2020-07-07 01:40:52 -07:00
README.txt [mlir] Add short readme.txt to docs directory 2020-02-18 08:35:22 -08:00
SPIRVToLLVMDialectConversion.md [MLIR][SPIRVToLLVM] Updated documentation on spirv-cpu-runner 2020-12-22 01:47:43 +03:00
ShapeInference.md [mlir][Types][NFC] Move all of the builtin Type classes to BuiltinTypes.h 2020-12-03 18:02:10 -08:00
SymbolsAndSymbolTables.md [MLIR] Extend Symbol verification to reject public symbol declarations. 2020-11-16 16:05:32 -08:00
Traits.md [mlir] Add ElementwiseMappable trait and apply it to std elementwise ops. 2020-11-10 13:44:44 -08:00
doxygen-mainpage.dox [mlir] Bootstrap doxygen config 2020-01-25 09:31:59 -08:00
doxygen.cfg.in [mlir] NFC: fix trivial typo 2020-04-29 14:47:56 +09: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.