Lines Matching defs:conversion
1 //===- DialectConversion.cpp - MLIR dialect conversion generic pass -------===//
31 #define DEBUG_TYPE "dialect-conversion"
252 /// This class contains a snapshot of the current conversion rewriter state.
277 /// The dialect conversion keeps track of IR modifications (requested by the
283 /// The kind of the rewrite. Rewrites can be undone if the conversion fails.
308 /// conversion will succeed. All IR modifications, except for operation/block
313 /// because internal dialect conversion state (such as `mapping`) may still
460 // If a listener is attached to the dialect conversion, ops must be moved
534 /// Block type conversion. This rewrite is partially reflected in the IR.
555 /// The new block that was created as part of this signature conversion.
759 /// This materialization materializes a conversion from an illegal type to a
763 /// This materialization materializes a conversion from a legal type back to
770 /// conversion.
812 /// The values in the conversion value mapping that are being replaced by the
858 /// conversion process succeeds.
902 /// Apply the given signature conversion on the given block. The new block
907 /// signature conversion.
925 /// the results of the unresolved materialization in the conversion value
933 /// Find a replacement value for the given SSA value in the conversion value
1033 /// immediately but only when the dialect conversion succeeds. In the mean
1051 /// Dialect conversion configuration.
1060 /// A logger used to emit diagnostics during the conversion process.
1240 // If there is no legal conversion, fail to match this pattern.
1300 std::optional<TypeConverter::SignatureConversion> conversion =
1302 if (!conversion)
1305 applySignatureConversion(rewriter, &block, &converter, *conversion);
1308 // Convert the entry block. If an entry signature conversion was provided,
1313 std::optional<TypeConverter::SignatureConversion> conversion =
1315 if (!conversion)
1318 *conversion);
1357 // If a listener is attached to the dialect conversion, ops cannot be moved
1453 // Try to find a replacement value with the same type in the conversion value
1486 // in the conversion value mapping.) The insertion point of the
1488 // later in the conversion process.
1528 // unrealized_conversion_cast op that was created by the conversion driver.
1553 // that were inserted by the conversion driver. We keep track of these
1691 Block *block, TypeConverter::SignatureConversion &conversion,
1694 "attempting to apply a signature conversion to a block within a "
1696 return impl->applySignatureConversion(*this, block, converter, conversion);
1703 "attempting to apply a signature conversion to a block within a "
1726 assert(remappedValues.front().size() == 1 && "1:N conversion not supported");
1740 assert(values.size() == 1 && "1:N conversion not supported");
1763 // If a listener is attached to the dialect conversion, ops cannot be moved
1844 "' does not support 1:N conversion");
1856 // Track the current conversion pattern type converter in the rewriter.
1895 /// Returns the conversion target in use by the legalizer.
1962 /// Apply the conversion cost model to the given set of patterns, and return
1979 /// Dialect conversion configuration.
2050 logSuccess(logger, "operation marked 'ignored' during conversion");
2260 std::optional<TypeConverter::SignatureConversion> conversion =
2262 if (!conversion) {
2267 impl.applySignatureConversion(rewriter, block, converter, *conversion);
2527 /// In this mode, the conversion will ignore failed conversions to allow
2532 /// conversion to succeed.
2542 // This class converts operations to a given conversion target via a set of
2543 // rewrite patterns. The conversion behaves differently depending on the
2544 // conversion mode.
2553 /// Converts the given operations to the conversion target.
2560 /// Dialect conversion configuration.
2566 /// The conversion mode to use when legalizing operations.
2575 // Handle the case of a failed conversion for each of the different modes.
2609 // Try to materialize the conversion.
2643 << ") that remained live after conversion";
2660 // Don't check this operation's children for conversion if the
2677 // After a successful conversion, apply rewrites.
2691 // dialect conversion frameworks. (Not the one that were inserted by
2978 SignatureConversion conversion(block->getNumArguments());
2979 if (failed(convertSignatureArgs(block->getArgumentTypes(), conversion)))
2981 return conversion;
2985 // Type attribute conversion
3061 /// Create a default conversion pattern that rewrites the type signature of a