|
MLIR 22.0.0git
|
Public Member Functions | |
| OperationConverter (MLIRContext *ctx, const ConversionTarget &target, const FrozenRewritePatternSet &patterns, const ConversionConfig &config, OpConversionMode mode) | |
| LogicalResult | applyConversion (ArrayRef< Operation * > ops) |
| Applies the conversion to the given operations (and their nested operations). | |
| template<typename Fn> | |
| LogicalResult | legalizeOperations (ArrayRef< Operation * > ops, Fn onFailure, bool isRecursiveLegalization=false) |
| Legalizes the given operations (and their nested operations) to the conversion target. | |
| LogicalResult | legalizeOperations (ArrayRef< Operation * > ops, bool isRecursiveLegalization=false) |
| LogicalResult | convert (Operation *op, bool isRecursiveLegalization=false) |
| Converts a single operation. | |
| const ConversionTarget & | getTarget () |
Definition at line 3251 of file DialectConversion.cpp.
|
inlineexplicit |
Definition at line 3252 of file DialectConversion.cpp.
References mlir::config, mlir::patterns, and target.
Applies the conversion to the given operations (and their nested operations).
Definition at line 3444 of file DialectConversion.cpp.
References mlir::detail::ConversionPatternRewriterImpl::applyRewrites(), mlir::detail::ConversionPatternRewriterImpl::config, kPureTypeConversionMarker, legalizeOperations(), legalizeUnresolvedMaterialization(), mlir::reconcileUnrealizedCasts(), mlir::detail::ConversionPatternRewriterImpl::rewriter, success(), mlir::detail::ConversionPatternRewriterImpl::undoRewrites(), and mlir::detail::ConversionPatternRewriterImpl::unresolvedMaterializations.
Referenced by applyConversion().
Converts a single operation.
If isRecursiveLegalization is "true", the conversion is a recursive legalization request, triggered from within a pattern. In that case, do not emit errors because there will be another attempt at legalizing the operation later (via the regular pre-order legalization mechanism).
Definition at line 3295 of file DialectConversion.cpp.
References mlir::config, mlir::Operation::emitError(), mlir::Operation::getName(), and success().
Referenced by legalizeOperations().
|
inline |
Definition at line 3281 of file DialectConversion.cpp.
|
inline |
Definition at line 3268 of file DialectConversion.cpp.
References legalizeOperations().
| LogicalResult OperationConverter::legalizeOperations | ( | ArrayRef< Operation * > | ops, |
| Fn | onFailure, | ||
| bool | isRecursiveLegalization = false ) |
Legalizes the given operations (and their nested operations) to the conversion target.
Definition at line 3382 of file DialectConversion.cpp.
References mlir::WalkResult::advance(), convert(), mlir::PreOrder, mlir::WalkResult::skip(), success(), and target.
Referenced by applyConversion(), and legalizeOperations().