CIRCT  18.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 24 of file ConversionPatterns.h.

Constructor & Destructor Documentation

◆ TypeConversionPattern()

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

Definition at line 26 of file ConversionPatterns.h.

Member Function Documentation

◆ matchAndRewrite()

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

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