CIRCT  20.0.0git
Public Member Functions | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for circt::TypeConversionPattern:
Collaboration graph
[legend]

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.

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: