forked from OSchip/llvm-project
0d7ff220ed
Summary: This revision refactors the TypeConverter class to not use inheritance to add type conversions. It instead moves to a registration based system, where conversion callbacks are added to the converter with `addConversion`. This method takes a conversion callback, which must be convertible to any of the following forms(where `T` is a class derived from `Type`: * Optional<Type> (T type) - This form represents a 1-1 type conversion. It should return nullptr or `llvm::None` to signify failure. If `llvm::None` is returned, the converter is allowed to try another conversion function to perform the conversion. * Optional<LogicalResult>(T type, SmallVectorImpl<Type> &results) - This form represents a 1-N type conversion. It should return `failure` or `llvm::None` to signify a failed conversion. If the new set of types is empty, the type is removed and any usages of the existing value are expected to be removed during conversion. If `llvm::None` is returned, the converter is allowed to try another conversion function to perform the conversion. When attempting to convert a type, the TypeConverter walks each of the registered converters starting with the one registered most recently. Differential Revision: https://reviews.llvm.org/D74584 |
||
---|---|---|
.. | ||
Dialects | ||
Tutorials/Toy | ||
includes/img | ||
CMakeLists.txt | ||
Canonicalization.md | ||
ConversionToLLVMDialect.md | ||
DeclarativeRewrites.md | ||
DefiningAttributesAndTypes.md | ||
Diagnostics.md | ||
DialectConversion.md | ||
EDSC.md | ||
GenericDAGRewriter.md | ||
Interfaces.md | ||
LangRef.md | ||
MLIRForGraphAlgorithms.md | ||
OpDefinitions.md | ||
Passes.md | ||
Quantization.md | ||
QuickstartRewrites.md | ||
README.txt | ||
Rationale.md | ||
RationaleLinalgDialect.md | ||
RationaleSimplifiedPolyhedralForm.md | ||
ShapeInference.md | ||
SymbolsAndSymbolTables.md | ||
Traits.md | ||
UsageOfConst.md | ||
WritingAPass.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.