CIRCT 20.0.0git
|
Base class for Intrinsic Converters. More...
#include <FIRRTLIntrinsics.h>
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(). | |
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.
|
virtualdefault |
|
virtual |
Definition at line 22 of file FIRRTLIntrinsics.cpp.
|
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().
|
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.
|
inlinevirtual |
Transform the intrinsic to its implementation.
Reimplemented in circt::firrtl::IntrinsicOpConverter< OpTy >.
Definition at line 210 of file FIRRTLIntrinsics.h.
Referenced by checkAndConvert().