forked from OSchip/llvm-project
![]() MLIR supports recursive types but they could not be handled by the conversion infrastructure directly as it would result in infinite recursion in `convertType` for elemental types. Support this case by keeping the "call stack" of nested type conversions in the TypeConverter class and by passing it as an optional argument to the individual conversion callback. The callback can then check if a specific type is present on the stack more than once to detect and handle the recursive case. This approach is preferred to the alternative approach of having a separate callback dedicated to handling only the recursive case as the latter was observed to introduce ~3% time overhead on a 50MB IR file even if it did not contain recursive types. This approach is also preferred to keeping a local stack in type converters that need to handle recursive types as that would compose poorly in case of out-of-tree or cross-project extensions. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D113579 |
||
---|---|---|
.. | ||
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.