CIRCT
20.0.0git
|
FuncOpPartialLoweringPatterns are patterns which intend to match on FuncOps and then perform their own walking of the IR. More...
#include <CalyxLoweringUtils.h>
Public Member Functions | |
FuncOpPartialLoweringPattern (MLIRContext *context, LogicalResult &resRef, PatternApplicationState &patternState, DenseMap< mlir::func::FuncOp, calyx::ComponentOp > &map, calyx::CalyxLoweringState &state) | |
LogicalResult | partiallyLower (mlir::func::FuncOp funcOp, PatternRewriter &rewriter) const override final |
Entry point to initialize the state of this class and conduct the partial lowering. More... | |
calyx::ComponentOp | getComponent () const |
Returns the component operation associated with the currently executing partial lowering. More... | |
template<typename T = ComponentLoweringStateInterface> | |
T & | getState () const |
CalyxLoweringState & | loweringState () const |
Return the calyx lowering state for this pattern. More... | |
virtual LogicalResult | partiallyLowerFuncToComp (mlir::func::FuncOp funcOp, PatternRewriter &rewriter) const =0 |
Public Member Functions inherited from circt::calyx::PartialLoweringPattern< mlir::func::FuncOp > | |
PartialLoweringPattern (MLIRContext *ctx, LogicalResult &resRef, PatternApplicationState &patternState) | |
LogicalResult | matchAndRewrite (mlir::func::FuncOp op, PatternRewriter &rewriter) const override |
Protected Attributes | |
DenseMap< mlir::func::FuncOp, calyx::ComponentOp > & | functionMapping |
Private Attributes | |
ComponentOp | componentOp |
ComponentLoweringStateInterface * | componentLoweringState = nullptr |
CalyxLoweringState & | calyxLoweringState |
FuncOpPartialLoweringPatterns are patterns which intend to match on FuncOps and then perform their own walking of the IR.
Definition at line 607 of file CalyxLoweringUtils.h.
circt::calyx::FuncOpPartialLoweringPattern::FuncOpPartialLoweringPattern | ( | MLIRContext * | context, |
LogicalResult & | resRef, | ||
PatternApplicationState & | patternState, | ||
DenseMap< mlir::func::FuncOp, calyx::ComponentOp > & | map, | ||
calyx::CalyxLoweringState & | state | ||
) |
Definition at line 483 of file CalyxLoweringUtils.cpp.
calyx::ComponentOp circt::calyx::FuncOpPartialLoweringPattern::getComponent | ( | ) | const |
Returns the component operation associated with the currently executing partial lowering.
Definition at line 506 of file CalyxLoweringUtils.cpp.
References assert(), and componentOp.
Referenced by circt::calyx::BuildReturnRegs::partiallyLowerFuncToComp(), and circt::calyx::BuildCallInstance::partiallyLowerFuncToComp().
|
inline |
Definition at line 629 of file CalyxLoweringUtils.h.
References assert(), and componentLoweringState.
Referenced by circt::calyx::BuildReturnRegs::partiallyLowerFuncToComp(), and circt::calyx::BuildCallInstance::partiallyLowerFuncToComp().
CalyxLoweringState & circt::calyx::FuncOpPartialLoweringPattern::loweringState | ( | ) | const |
Return the calyx lowering state for this pattern.
Definition at line 512 of file CalyxLoweringUtils.cpp.
References calyxLoweringState.
|
finaloverridevirtual |
Entry point to initialize the state of this class and conduct the partial lowering.
Implements circt::calyx::PartialLoweringPattern< mlir::func::FuncOp >.
Definition at line 492 of file CalyxLoweringUtils.cpp.
References calyxLoweringState, componentLoweringState, componentOp, functionMapping, circt::calyx::CalyxLoweringState::getState(), and partiallyLowerFuncToComp().
|
pure virtual |
Implemented in circt::calyx::BuildCallInstance, circt::calyx::BuildReturnRegs, circt::calyx::BuildBasicBlockRegs, and circt::calyx::ConvertIndexTypes.
Referenced by partiallyLower().
|
private |
Definition at line 662 of file CalyxLoweringUtils.h.
Referenced by loweringState(), and partiallyLower().
|
mutableprivate |
Definition at line 661 of file CalyxLoweringUtils.h.
Referenced by getState(), and partiallyLower().
|
mutableprivate |
Definition at line 660 of file CalyxLoweringUtils.h.
Referenced by circt::calyx::BuildCallInstance::getCallComponent(), getComponent(), partiallyLower(), and circt::calyx::BuildCallInstance::partiallyLowerFuncToComp().
|
protected |
Definition at line 657 of file CalyxLoweringUtils.h.
Referenced by circt::calyx::BuildCallInstance::getCallComponent(), and partiallyLower().