CIRCT
20.0.0git
|
Lowering helper which collects all intrinsic converters. More...
#include <FIRRTLIntrinsics.h>
Public Types | |
using | ConversionMapTy = llvm::DenseMap< StringAttr, std::unique_ptr< IntrinsicConverter > > |
Public Member Functions | |
IntrinsicLowerings (MLIRContext *context) | |
template<typename T , typename... Args> | |
void | add (Args... args) |
Registers a converter to one or more intrinsic names. More... | |
FailureOr< size_t > | lower (FModuleOp mod, bool allowUnknownIntrinsics=false) |
Lowers all intrinsics in a module. Returns number converted or failure. More... | |
Private Member Functions | |
template<typename T > | |
std::enable_if_t< std::is_base_of_v< IntrinsicConverter, T > > | addConverter (StringRef name) |
Private Attributes | |
MLIRContext * | context |
Reference to the MLIR context. More... | |
ConversionMapTy | conversions |
Mapping from intrinsic names to converters. More... | |
Lowering helper which collects all intrinsic converters.
Definition at line 219 of file FIRRTLIntrinsics.h.
using circt::firrtl::IntrinsicLowerings::ConversionMapTy = llvm::DenseMap<StringAttr, std::unique_ptr<IntrinsicConverter> > |
Definition at line 221 of file FIRRTLIntrinsics.h.
|
inline |
Definition at line 232 of file FIRRTLIntrinsics.h.
|
inline |
Registers a converter to one or more intrinsic names.
Definition at line 236 of file FIRRTLIntrinsics.h.
Referenced by circt::firrtl::FIRRTLIntrinsicLoweringDialectInterface::populateIntrinsicLowerings().
|
inlineprivate |
Definition at line 246 of file FIRRTLIntrinsics.h.
References assert(), context, conversions, and circt::calyx::direction::get().
FailureOr< size_t > IntrinsicLowerings::lower | ( | FModuleOp | mod, |
bool | allowUnknownIntrinsics = false |
||
) |
Lowers all intrinsics in a module. Returns number converted or failure.
Definition at line 147 of file FIRRTLIntrinsics.cpp.
References circt::firrtl::areTypesEquivalent(), context, conversions, circt::firrtl::emitConnect(), and circt::firrtl::isTypeLarger().
|
private |
Reference to the MLIR context.
Definition at line 226 of file FIRRTLIntrinsics.h.
Referenced by addConverter(), and lower().
|
private |
Mapping from intrinsic names to converters.
Definition at line 229 of file FIRRTLIntrinsics.h.
Referenced by addConverter(), and lower().