CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::TypeConversionPattern Struct Reference

Generic pattern which replaces an operation by one of the same operation name, but with converted attributes, operands, and result types to eliminate illegal types. More...

#include <ConversionPatterns.h>

Inheritance diagram for circt::TypeConversionPattern:
Collaboration diagram for circt::TypeConversionPattern:

Public Member Functions

 TypeConversionPattern (TypeConverter &converter, MLIRContext *context)
LogicalResult matchAndRewrite (Operation *op, ArrayRef< Value > operands, ConversionPatternRewriter &rewriter) const override

Detailed Description

Generic pattern which replaces an operation by one of the same operation name, but with converted attributes, operands, and result types to eliminate illegal types.

Uses generic builders based on OperationState to make sure that this pattern can apply to any operation.

Useful when a conversion can be entirely defined by a TypeConverter.

Definition at line 29 of file ConversionPatterns.h.

Constructor & Destructor Documentation

◆ TypeConversionPattern()

circt::TypeConversionPattern::TypeConversionPattern ( TypeConverter & converter,
MLIRContext * context )
inline

Definition at line 31 of file ConversionPatterns.h.

References context.

Member Function Documentation

◆ matchAndRewrite()

LogicalResult circt::TypeConversionPattern::matchAndRewrite ( Operation * op,
ArrayRef< Value > operands,
ConversionPatternRewriter & rewriter ) const
inlineoverride

Definition at line 36 of file ConversionPatterns.h.

References circt::doTypeConversion().


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