CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::scftocalyx::LateSSAReplacement Class Reference

LateSSAReplacement contains various functions for replacing SSA values that were not replaced during op construction. More...

Inheritance diagram for circt::scftocalyx::LateSSAReplacement:
Collaboration diagram for circt::scftocalyx::LateSSAReplacement:

Private Member Functions

LogicalResult partiallyLowerFuncToComp (FuncOp funcOp, PatternRewriter &rewriter) const override

Additional Inherited Members

Public Member Functions inherited from circt::calyx::FuncOpPartialLoweringPattern
 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.
calyx::ComponentOp getComponent () const
 Returns the component operation associated with the currently executing partial lowering.
template<typename T = ComponentLoweringStateInterface>
T & getState () const
CalyxLoweringState & loweringState () const
 Return the calyx lowering state for this pattern.
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 inherited from circt::calyx::FuncOpPartialLoweringPattern
DenseMap< mlir::func::FuncOp, calyx::ComponentOp > & functionMapping

Detailed Description

LateSSAReplacement contains various functions for replacing SSA values that were not replaced during op construction.

Definition at line 2584 of file SCFToCalyx.cpp.

Member Function Documentation

◆ partiallyLowerFuncToComp()

LogicalResult circt::scftocalyx::LateSSAReplacement::partiallyLowerFuncToComp ( FuncOp funcOp,
PatternRewriter & rewriter ) const
inlineoverrideprivate

The yielded values returned from the while op will be present in the iterargs registers post execution of the loop. This is done now, as opposed to during BuildWhileGroups since if the results of the whileOp were replaced before BuildOpGroups/BuildControl, the whileOp would get dead-code eliminated.

In buildOpGroups we did not replace loadOp's results, to ensure a link between evaluating groups (which fix the input addresses of a memory op) and a readData result. Now, we may replace these SSA values with their memoryOp readData output.

Definition at line 2588 of file SCFToCalyx.cpp.

References circt::calyx::WhileOpInterface< T >::getOperation(), circt::calyx::FuncOpPartialLoweringPattern::getState(), circt::calyx::singleLoadFromMemory(), and success().


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