CIRCT 20.0.0git
Loading...
Searching...
No Matches
Public Member Functions | List of all members
circt::firrtl::IntrinsicConverter Class Reference

Base class for Intrinsic Converters. More...

#include <FIRRTLIntrinsics.h>

Inheritance diagram for circt::firrtl::IntrinsicConverter:
Inheritance graph
[legend]

Public Member Functions

virtual void anchor ()
 
virtual ~IntrinsicConverter ()=default
 
virtual bool check (GenericIntrinsic gi)
 Checks whether the intrinsic is well-formed.
 
virtual void convert (GenericIntrinsic gi, GenericIntrinsicOpAdaptor adaptor, PatternRewriter &rewriter)
 Transform the intrinsic to its implementation.
 
virtual LogicalResult checkAndConvert (GenericIntrinsic gi, GenericIntrinsicOpAdaptor adaptor, PatternRewriter &rewriter)
 Perform both check and convert, defaults to using check() and convert().
 

Detailed Description

Base class for Intrinsic Converters.

Intrinsic converters contain validation logic, along with a converter method to transform generic intrinsic ops to their implementation. Instances of a converter must be stateless and are expected to be able to be used simultaneously on different intrinsic operations in parallel.

Definition at line 194 of file FIRRTLIntrinsics.h.

Constructor & Destructor Documentation

◆ ~IntrinsicConverter()

virtual circt::firrtl::IntrinsicConverter::~IntrinsicConverter ( )
virtualdefault

Member Function Documentation

◆ anchor()

void IntrinsicConverter::anchor ( )
virtual

Definition at line 22 of file FIRRTLIntrinsics.cpp.

◆ check()

virtual bool circt::firrtl::IntrinsicConverter::check ( GenericIntrinsic  gi)
inlinevirtual

Checks whether the intrinsic is well-formed.

This or's multiple ParseResults together, returning true on failure.

Definition at line 203 of file FIRRTLIntrinsics.h.

Referenced by checkAndConvert().

◆ checkAndConvert()

virtual LogicalResult circt::firrtl::IntrinsicConverter::checkAndConvert ( GenericIntrinsic  gi,
GenericIntrinsicOpAdaptor  adaptor,
PatternRewriter &  rewriter 
)
inlinevirtual

Perform both check and convert, defaults to using check() and convert().

Return failure if check fails (no changes to IR should be made). Otherwise, transform the intrinsic and return success. Prefer overriding check and convert, but overriding this can avoid recomputing work done during check needed for the conversion.

Definition at line 221 of file FIRRTLIntrinsics.h.

References check(), and convert().

◆ convert()

virtual void circt::firrtl::IntrinsicConverter::convert ( GenericIntrinsic  gi,
GenericIntrinsicOpAdaptor  adaptor,
PatternRewriter &  rewriter 
)
inlinevirtual

Transform the intrinsic to its implementation.

Reimplemented in circt::firrtl::IntrinsicOpConverter< OpTy >.

Definition at line 210 of file FIRRTLIntrinsics.h.

Referenced by checkAndConvert().


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