MLIR 22.0.0git
mlir::detail::ConversionPatternRewriterImpl Struct Reference
Inheritance diagram for mlir::detail::ConversionPatternRewriterImpl:

Classes

struct  SingleEraseRewriter
 A rewriter that keeps track of erased ops and blocks. More...

Public Member Functions

 ConversionPatternRewriterImpl (ConversionPatternRewriter &rewriter, const ConversionConfig &config, OperationConverter &opConverter)
RewriterState getCurrentState ()
 Return the current state of the rewriter.
void applyRewrites ()
 Apply all requested operation rewrites.
void resetState (RewriterState state, StringRef patternName="")
 Reset the state of the rewriter to a previously saved point.
template<typename RewriteTy, typename... Args>
void appendRewrite (Args &&...args)
 Append a rewrite.
void undoRewrites (unsigned numRewritesToKeep=0, StringRef patternName="")
 Undo the rewrites (motions, splits) one by one in reverse order until "numRewritesToKeep" rewrites remains.
LogicalResult remapValues (StringRef valueDiagTag, std::optional< Location > inputLoc, ValueRange values, SmallVector< ValueVector > &remapped)
 Remap the given values to those with potentially different types.
bool isOpIgnored (Operation *op) const
 Return "true" if the given operation is ignored, and does not need to be converted.
bool wasOpReplaced (Operation *op) const
 Return "true" if the given operation was replaced or erased.
ValueVector lookupOrDefault (Value from, TypeRange desiredTypes={}, bool skipPureTypeConversions=false) const
 Lookup the most recently mapped values with the desired types in the mapping, taking into account only replacements.
ValueVector lookupOrNull (Value from, TypeRange desiredTypes={}) const
 Lookup the given value within the map, or return an empty vector if the value is not mapped.
FailureOr< Block * > convertRegionTypes (Region *region, const TypeConverter &converter, TypeConverter::SignatureConversion *entryConversion)
 Convert the types of block arguments within the given region.
BlockapplySignatureConversion (Block *block, const TypeConverter *converter, TypeConverter::SignatureConversion &signatureConversion)
 Apply the given signature conversion on the given block.
void replaceOp (Operation *op, SmallVector< SmallVector< Value > > &&newValues)
 Replace the results of the given operation with the given values and erase the operation.
void replaceAllUsesWith (Value from, ValueRange to, const TypeConverter *converter)
 Replace the uses of the given value with the given values.
void eraseBlock (Block *block)
 Erase the given block and its contents.
void inlineBlockBefore (Block *source, Block *dest, Block::iterator before)
 Inline the source block into the destination block before the given iterator.
ValueRange buildUnresolvedMaterialization (MaterializationKind kind, OpBuilder::InsertPoint ip, Location loc, ValueVector valuesToMap, ValueRange inputs, TypeRange outputTypes, Type originalType, const TypeConverter *converter, bool isPureTypeConversion=true)
 Build an unresolved materialization operation given a range of output types and a list of input operands.
Value findOrBuildReplacementValue (Value value, const TypeConverter *converter)
 Find a replacement value for the given SSA value in the conversion value mapping.
void notifyOperationInserted (Operation *op, OpBuilder::InsertPoint previous) override
 Notify the listener that the specified operation was inserted.
void notifyBlockInserted (Block *block, Region *previous, Region::iterator previousIt) override
 Notifies that a block was inserted.
void notifyMatchFailure (Location loc, function_ref< void(Diagnostic &)> reasonCallback) override
 Notifies that a pattern match failed for the given reason.
Public Member Functions inherited from mlir::RewriterBase::Listener
 Listener ()
virtual void notifyBlockErased (Block *block)
 Notify the listener that the specified block is about to be erased.
virtual void notifyOperationModified (Operation *op)
 Notify the listener that the specified operation was modified in-place.
virtual void notifyOperationReplaced (Operation *op, Operation *replacement)
 Notify the listener that all uses of the specified operation's results are about to be replaced with the results of another operation.
virtual void notifyOperationReplaced (Operation *op, ValueRange replacement)
 Notify the listener that all uses of the specified operation's results are about to be replaced with the a range of values, potentially produced by other operations.
virtual void notifyOperationErased (Operation *op)
 Notify the listener that the specified operation is about to be erased.
virtual void notifyPatternBegin (const Pattern &pattern, Operation *op)
 Notify the listener that the specified pattern is about to be applied at the specified root operation.
virtual void notifyPatternEnd (const Pattern &pattern, LogicalResult status)
 Notify the listener that a pattern application finished with the specified status.
Public Member Functions inherited from mlir::OpBuilder::Listener
 Listener ()
virtual ~Listener ()=default
Public Member Functions inherited from mlir::OpBuilder::ListenerBase
Kind getKind () const

Public Attributes

ConversionPatternRewriter & rewriter
 The rewriter that is used to perform the conversion.
ConversionValueMapping mapping
SmallVector< std::unique_ptr< IRRewrite > > rewrites
 Ordered list of block operations (creations, splits, motions).
SetVector< Operation * > ignoredOps
 A set of operations that should no longer be considered for legalization.
SetVector< Operation * > replacedOps
 A set of operations that were replaced/erased.
SetVector< Operation * > patternNewOps
 A set of operations that were created by the current pattern.
SetVector< Operation * > patternModifiedOps
 A set of operations that were modified by the current pattern.
DenseSet< UnrealizedConversionCastOp > patternMaterializations
 A list of unresolved materializations that were created by the current pattern.
DenseMap< UnrealizedConversionCastOp, UnresolvedMaterializationInfo > unresolvedMaterializations
 A mapping for looking up metadata of unresolved materializations.
const TypeConvertercurrentTypeConverter = nullptr
 The current type converter, or nullptr if no type converter is currently active.
DenseMap< Region *, const TypeConverter * > regionToConverter
 A mapping of regions to type converters that should be used when converting the arguments of blocks within that region.
const ConversionConfig & config
 Dialect conversion configuration.
OperationConverteropConverter
 The operation converter to use for recursive legalization.
DenseSet< Operation * > erasedOps
 A set of erased operations.
DenseSet< Block * > erasedBlocks
 A set of erased blocks.
IRRewriter notifyingRewriter
 A rewriter that notifies the listener (if any) about all IR modifications.
DenseSet< ValuereplacedValues
 A set of replaced values.
SmallPtrSet< Operation *, 1 > pendingRootUpdates
 A set of operations that have pending updates.
llvm::impl::raw_ldbg_ostream os
 A raw output stream used to prefix the debug log.
llvm::ScopedPrinter logger {os}
 A logger used to emit diagnostics during the conversion process.
std::string logPrefix

Additional Inherited Members

Public Types inherited from mlir::OpBuilder::ListenerBase
enum class  Kind { OpBuilderListener = 0 , RewriterBaseListener = 1 }
 The kind of listener. More...
Static Public Member Functions inherited from mlir::RewriterBase::Listener
static bool classof (const OpBuilder::Listener *base)
Protected Member Functions inherited from mlir::OpBuilder::Listener
 Listener (Kind kind)
Protected Member Functions inherited from mlir::OpBuilder::ListenerBase
 ListenerBase (Kind kind)

Detailed Description

Definition at line 884 of file DialectConversion.cpp.

Constructor & Destructor Documentation

◆ ConversionPatternRewriterImpl()

mlir::detail::ConversionPatternRewriterImpl::ConversionPatternRewriterImpl ( ConversionPatternRewriter & rewriter,
const ConversionConfig & config,
OperationConverter & opConverter )
inlineexplicit

Definition at line 885 of file DialectConversion.cpp.

References config, getContext(), notifyingRewriter, opConverter, and rewriter.

Member Function Documentation

◆ appendRewrite()

template<typename RewriteTy, typename... Args>
void mlir::detail::ConversionPatternRewriterImpl::appendRewrite ( Args &&... args)
inline

Append a rewrite.

Rewrites are committed upon success and rolled back upon failure.

Definition at line 910 of file DialectConversion.cpp.

References config, and rewrites.

Referenced by applySignatureConversion(), buildUnresolvedMaterialization(), eraseBlock(), inlineBlockBefore(), notifyBlockInserted(), notifyOperationInserted(), replaceAllUsesWith(), and replaceOp().

◆ applyRewrites()

void ConversionPatternRewriterImpl::applyRewrites ( )

Apply all requested operation rewrites.

This method is invoked when the conversion process succeeds.

Definition at line 1318 of file DialectConversion.cpp.

References config, rewrite(), rewriter, and rewrites.

Referenced by mlir::OperationConverter::convertOperations().

◆ applySignatureConversion()

Block * ConversionPatternRewriterImpl::applySignatureConversion ( Block * block,
const TypeConverter * converter,
TypeConverter::SignatureConversion & signatureConversion )

Apply the given signature conversion on the given block.

The new block containing the updated signature is returned. If no conversions were necessary, e.g. if the block has no arguments, block is returned. converter is used to generate any necessary cast operations that translate between the origin argument types and those specified in the signature conversion.

Definition at line 1575 of file DialectConversion.cpp.

References appendRewrite(), mlir::Block::begin(), buildUnresolvedMaterialization(), config, mlir::Block::empty(), mlir::Block::end(), mlir::Block::front(), mlir::Block::getArgument(), mlir::Block::getArguments(), mlir::Block::getArgumentTypes(), mlir::BlockArgument::getLoc(), mlir::Block::getNumArguments(), mlir::Block::getOperations(), mlir::Block::getParent(), mlir::Value::getType(), replaceAllUsesWith(), mlir::IRObjectWithUseList< OperandType >::replaceAllUsesWith(), rewriter, and rewrites.

Referenced by convertRegionTypes().

◆ buildUnresolvedMaterialization()

ValueRange ConversionPatternRewriterImpl::buildUnresolvedMaterialization ( MaterializationKind kind,
OpBuilder::InsertPoint ip,
Location loc,
ValueVector valuesToMap,
ValueRange inputs,
TypeRange outputTypes,
Type originalType,
const TypeConverter * converter,
bool isPureTypeConversion = true )

Build an unresolved materialization operation given a range of output types and a list of input operands.

Build an unresolved materialization operation given an output type and set of input operands.

Returns the inputs if they their types match the output types.

If a cast op was built, it can optionally be returned with the castOp output argument.

If valuesToMap is set to a non-null Value, then that value is mapped to the results of the unresolved materialization in the conversion value mapping.

If isPureTypeConversion is "true", the materialization is created only to resolve a type mismatch. That means it is not a regular value replacement issued by the user. (Replacement values that are created "out of thin air" appear like unresolved materializations because they are unrealized_conversion_cast ops. However, they must be treated like regular value replacements.)

Definition at line 1684 of file DialectConversion.cpp.

References appendRewrite(), config, mlir::OpBuilder::InsertPoint::getBlock(), mlir::OpBuilder::InsertPoint::getPoint(), mlir::Builder::getStringAttr(), mlir::Builder::getUnitAttr(), isPureTypeConversion(), kPureTypeConversionMarker, mapping, patternMaterializations, mlir::OpBuilder::setInsertionPoint(), TypeRange, and unresolvedMaterializations.

Referenced by applySignatureConversion(), findOrBuildReplacementValue(), and remapValues().

◆ convertRegionTypes()

FailureOr< Block * > ConversionPatternRewriterImpl::convertRegionTypes ( Region * region,
const TypeConverter & converter,
TypeConverter::SignatureConversion * entryConversion )

Convert the types of block arguments within the given region.

Definition at line 1544 of file DialectConversion.cpp.

References applySignatureConversion(), mlir::Region::empty(), mlir::Region::front(), and regionToConverter.

◆ eraseBlock()

◆ findOrBuildReplacementValue()

Value ConversionPatternRewriterImpl::findOrBuildReplacementValue ( Value value,
const TypeConverter * converter )

Find a replacement value for the given SSA value in the conversion value mapping.

The replacement value must have the same type as the given SSA value. If there is no replacement value with the correct type, find the latest replacement value (regardless of the type) and build a source materialization.

Definition at line 1722 of file DialectConversion.cpp.

References buildUnresolvedMaterialization(), computeInsertPoint(), config, mlir::Value::getLoc(), mlir::Value::getType(), mlir::Value::getUsers(), lookupOrNull(), and mapping.

◆ getCurrentState()

RewriterState ConversionPatternRewriterImpl::getCurrentState ( )

Return the current state of the rewriter.

Definition at line 1448 of file DialectConversion.cpp.

References ignoredOps, replacedOps, and rewrites.

◆ inlineBlockBefore()

void ConversionPatternRewriterImpl::inlineBlockBefore ( Block * source,
Block * dest,
Block::iterator before )

Inline the source block into the destination block before the given iterator.

Definition at line 2086 of file DialectConversion.cpp.

References appendRewrite().

◆ isOpIgnored()

bool ConversionPatternRewriterImpl::isOpIgnored ( Operation * op) const

Return "true" if the given operation is ignored, and does not need to be converted.

Definition at line 1530 of file DialectConversion.cpp.

References ignoredOps, and wasOpReplaced().

◆ lookupOrDefault()

ValueVector ConversionPatternRewriterImpl::lookupOrDefault ( Value from,
TypeRange desiredTypes = {},
bool skipPureTypeConversions = false ) const

Lookup the most recently mapped values with the desired types in the mapping, taking into account only replacements.

Perform a best-effort search for existing materializations with the desired types.

If skipPureTypeConversions is "true", materializations that are pure type conversions are not considered.

Definition at line 1341 of file DialectConversion.cpp.

References config, getCommonDefiningOp(), isPureTypeConversion(), mapping, TypeRange, unresolvedMaterializations, and ValueRange.

Referenced by lookupOrNull(), and remapValues().

◆ lookupOrNull()

ValueVector ConversionPatternRewriterImpl::lookupOrNull ( Value from,
TypeRange desiredTypes = {} ) const

Lookup the given value within the map, or return an empty vector if the value is not mapped.

If it is mapped, this follows the same behavior as lookupOrDefault.

Definition at line 1439 of file DialectConversion.cpp.

References lookupOrDefault(), result, TypeRange, and ValueRange.

Referenced by findOrBuildReplacementValue().

◆ notifyBlockInserted()

void ConversionPatternRewriterImpl::notifyBlockInserted ( Block * block,
Region * previous,
Region::iterator previousIt )
overridevirtual

Notifies that a block was inserted.

Reimplemented from mlir::OpBuilder::Listener.

Definition at line 2036 of file DialectConversion.cpp.

References appendRewrite(), config, erasedBlocks, mlir::Operation::getName(), mlir::Block::getParentOp(), logger, and wasOpReplaced().

◆ notifyMatchFailure()

void ConversionPatternRewriterImpl::notifyMatchFailure ( Location loc,
function_ref< void(Diagnostic &)> reasonCallback )
overridevirtual

Notifies that a pattern match failed for the given reason.

Reimplemented from mlir::RewriterBase::Listener.

Definition at line 2092 of file DialectConversion.cpp.

References config, diag(), logger, and mlir::Remark.

Referenced by remapValues().

◆ notifyOperationInserted()

void ConversionPatternRewriterImpl::notifyOperationInserted ( Operation * op,
OpBuilder::InsertPoint previous )
overridevirtual

Notify the listener that the specified operation was inserted.

  • If the operation was moved, then previous is the previous location of the op.
  • If the operation was unlinked before it was inserted, then previous is empty.

Note: Creating an (unlinked) op does not trigger this notification.

Reimplemented from mlir::OpBuilder::Listener.

Definition at line 1777 of file DialectConversion.cpp.

References appendRewrite(), config, erasedOps, mlir::Operation::getName(), mlir::Operation::getParentOp(), mlir::OpBuilder::InsertPoint::isSet(), logger, patternNewOps, and wasOpReplaced().

◆ remapValues()

LogicalResult ConversionPatternRewriterImpl::remapValues ( StringRef valueDiagTag,
std::optional< Location > inputLoc,
ValueRange values,
SmallVector< ValueVector > & remapped )

Remap the given values to those with potentially different types.

Returns success if the values could be remapped, failure otherwise. valueDiagTag is the tag used when describing a value within a diagnostic, e.g. "operand".

Definition at line 1473 of file DialectConversion.cpp.

References buildUnresolvedMaterialization(), computeInsertPoint(), currentTypeConverter, diag(), mlir::Value::getLoc(), mlir::Value::getType(), lookupOrDefault(), notifyMatchFailure(), success(), and ValueRange.

◆ replaceAllUsesWith()

void ConversionPatternRewriterImpl::replaceAllUsesWith ( Value from,
ValueRange to,
const TypeConverter * converter )

Replace the uses of the given value with the given values.

The specified converter is used to build materializations (if necessary).

Definition at line 1965 of file DialectConversion.cpp.

References appendRewrite(), config, mlir::Value::getContext(), mlir::Value::getDefiningOp(), getReplacementValues(), mapping, performReplaceValue(), replacedValues, and wasOpReplaced().

Referenced by applySignatureConversion().

◆ replaceOp()

void ConversionPatternRewriterImpl::replaceOp ( Operation * op,
SmallVector< SmallVector< Value > > && newValues )

Replace the results of the given operation with the given values and erase the operation.

There can be multiple replacement values for each result (1:N replacement). If the replacement values are empty, the respective result is dropped and a source materialization is built if the result still has uses.

Definition at line 1872 of file DialectConversion.cpp.

References appendRewrite(), config, currentTypeConverter, erasedBlocks, erasedOps, mlir::Operation::getName(), mlir::Operation::getNumResults(), getReplacementValues(), mlir::Operation::getResults(), ignoredOps, logger, mapping, notifyingRewriter, patternMaterializations, replacedOps, replacedValues, result, TypeRange, unresolvedMaterializations, ValueRange, and mlir::Operation::walk().

◆ resetState()

void ConversionPatternRewriterImpl::resetState ( RewriterState state,
StringRef patternName = "" )

Reset the state of the rewriter to a previously saved point.

Optionally, the name of the pattern that triggered the rollback can specified for debugging purposes.

Definition at line 1452 of file DialectConversion.cpp.

References ignoredOps, replacedOps, and undoRewrites().

◆ undoRewrites()

void ConversionPatternRewriterImpl::undoRewrites ( unsigned numRewritesToKeep = 0,
StringRef patternName = "" )

Undo the rewrites (motions, splits) one by one in reverse order until "numRewritesToKeep" rewrites remains.

Optionally, the name of the pattern that triggered the rollback can specified for debugging purposes.

Definition at line 1465 of file DialectConversion.cpp.

References rewrite(), and rewrites.

Referenced by mlir::OperationConverter::convertOperations(), and resetState().

◆ wasOpReplaced()

bool ConversionPatternRewriterImpl::wasOpReplaced ( Operation * op) const

Return "true" if the given operation was replaced or erased.

Definition at line 1535 of file DialectConversion.cpp.

References erasedOps, and replacedOps.

Referenced by eraseBlock(), isOpIgnored(), notifyBlockInserted(), notifyOperationInserted(), and replaceAllUsesWith().

Member Data Documentation

◆ config

◆ currentTypeConverter

const TypeConverter* mlir::detail::ConversionPatternRewriterImpl::currentTypeConverter = nullptr

The current type converter, or nullptr if no type converter is currently active.

Definition at line 1136 of file DialectConversion.cpp.

Referenced by remapValues(), and replaceOp().

◆ erasedBlocks

DenseSet<Block *> mlir::detail::ConversionPatternRewriterImpl::erasedBlocks

A set of erased blocks.

This set is utilized only if allowPatternRollback is set to "false".

Definition at line 1157 of file DialectConversion.cpp.

Referenced by eraseBlock(), notifyBlockInserted(), and replaceOp().

◆ erasedOps

DenseSet<Operation *> mlir::detail::ConversionPatternRewriterImpl::erasedOps

A set of erased operations.

This set is utilized only if allowPatternRollback is set to "false". Conceptually, this set is similar to replacedOps (which is maintained when the flag is set to "true"). However, erasing from a DenseSet is more efficient than erasing from a SetVector.

Definition at line 1153 of file DialectConversion.cpp.

Referenced by eraseBlock(), notifyOperationInserted(), replaceOp(), and wasOpReplaced().

◆ ignoredOps

SetVector<Operation *> mlir::detail::ConversionPatternRewriterImpl::ignoredOps

A set of operations that should no longer be considered for legalization.

E.g., ops that are recursively legal. Ops that were replaced/erased are tracked separately.

Definition at line 1112 of file DialectConversion.cpp.

Referenced by eraseBlock(), getCurrentState(), isOpIgnored(), replaceOp(), and resetState().

◆ logger

llvm::ScopedPrinter mlir::detail::ConversionPatternRewriterImpl::logger {os}

A logger used to emit diagnostics during the conversion process.

Definition at line 1180 of file DialectConversion.cpp.

Referenced by notifyBlockInserted(), notifyMatchFailure(), notifyOperationInserted(), and replaceOp().

◆ logPrefix

std::string mlir::detail::ConversionPatternRewriterImpl::logPrefix

Definition at line 1181 of file DialectConversion.cpp.

◆ mapping

ConversionValueMapping mlir::detail::ConversionPatternRewriterImpl::mapping

◆ notifyingRewriter

IRRewriter mlir::detail::ConversionPatternRewriterImpl::notifyingRewriter

A rewriter that notifies the listener (if any) about all IR modifications.

This rewriter is utilized only if allowPatternRollback is set to "false". If the flag is set to "true", the listener is notified with a separate mechanism (e.g., in IRRewrite::commit).

Definition at line 1163 of file DialectConversion.cpp.

Referenced by ConversionPatternRewriterImpl(), eraseBlock(), and replaceOp().

◆ opConverter

OperationConverter& mlir::detail::ConversionPatternRewriterImpl::opConverter

The operation converter to use for recursive legalization.

Definition at line 1146 of file DialectConversion.cpp.

Referenced by ConversionPatternRewriterImpl().

◆ os

llvm::impl::raw_ldbg_ostream mlir::detail::ConversionPatternRewriterImpl::os
Initial value:
{(Twine("[") + DEBUG_TYPE + ":1] ").str(),
llvm::dbgs()}
#define DEBUG_TYPE

A raw output stream used to prefix the debug log.

Definition at line 1176 of file DialectConversion.cpp.

◆ patternMaterializations

DenseSet<UnrealizedConversionCastOp> mlir::detail::ConversionPatternRewriterImpl::patternMaterializations

A list of unresolved materializations that were created by the current pattern.

Definition at line 1128 of file DialectConversion.cpp.

Referenced by buildUnresolvedMaterialization(), eraseBlock(), and replaceOp().

◆ patternModifiedOps

SetVector<Operation *> mlir::detail::ConversionPatternRewriterImpl::patternModifiedOps

A set of operations that were modified by the current pattern.

Definition at line 1124 of file DialectConversion.cpp.

◆ patternNewOps

SetVector<Operation *> mlir::detail::ConversionPatternRewriterImpl::patternNewOps

A set of operations that were created by the current pattern.

Definition at line 1121 of file DialectConversion.cpp.

Referenced by notifyOperationInserted().

◆ pendingRootUpdates

SmallPtrSet<Operation *, 1> mlir::detail::ConversionPatternRewriterImpl::pendingRootUpdates

A set of operations that have pending updates.

This tracking isn't strictly necessary, and is thus only active during debug builds for extra verification.

Definition at line 1173 of file DialectConversion.cpp.

◆ regionToConverter

DenseMap<Region *, const TypeConverter *> mlir::detail::ConversionPatternRewriterImpl::regionToConverter

A mapping of regions to type converters that should be used when converting the arguments of blocks within that region.

Definition at line 1140 of file DialectConversion.cpp.

Referenced by convertRegionTypes().

◆ replacedOps

SetVector<Operation *> mlir::detail::ConversionPatternRewriterImpl::replacedOps

A set of operations that were replaced/erased.

Such ops are not erased immediately but only when the dialect conversion succeeds. In the mean time, they should no longer be considered for legalization and any attempt to modify/access them is invalid rewriter API usage.

Definition at line 1118 of file DialectConversion.cpp.

Referenced by eraseBlock(), getCurrentState(), replaceOp(), resetState(), and wasOpReplaced().

◆ replacedValues

DenseSet<Value> mlir::detail::ConversionPatternRewriterImpl::replacedValues

A set of replaced values.

This set is for debugging purposes only and it is maintained only if allowPatternRollback is set to "true".

Definition at line 1168 of file DialectConversion.cpp.

Referenced by replaceAllUsesWith(), and replaceOp().

◆ rewriter

ConversionPatternRewriter& mlir::detail::ConversionPatternRewriterImpl::rewriter

The rewriter that is used to perform the conversion.

Definition at line 1097 of file DialectConversion.cpp.

Referenced by applyRewrites(), applySignatureConversion(), ConversionPatternRewriterImpl(), and mlir::OperationConverter::convertOperations().

◆ rewrites

SmallVector<std::unique_ptr<IRRewrite> > mlir::detail::ConversionPatternRewriterImpl::rewrites

Ordered list of block operations (creations, splits, motions).

This vector is maintained only if allowPatternRollback is set to "true". Otherwise, all IR rewrites are materialized immediately and no bookkeeping is needed.

Definition at line 1107 of file DialectConversion.cpp.

Referenced by appendRewrite(), applyRewrites(), applySignatureConversion(), getCurrentState(), and undoRewrites().

◆ unresolvedMaterializations

DenseMap<UnrealizedConversionCastOp, UnresolvedMaterializationInfo> mlir::detail::ConversionPatternRewriterImpl::unresolvedMaterializations

A mapping for looking up metadata of unresolved materializations.

Definition at line 1132 of file DialectConversion.cpp.

Referenced by buildUnresolvedMaterialization(), mlir::OperationConverter::convertOperations(), eraseBlock(), lookupOrDefault(), and replaceOp().


The documentation for this struct was generated from the following file: