CIRCT 20.0.0git
|
Builds a control schedule by traversing the CFG of the function and associating this with the previously created groups. More...
Private Member Functions | |
LogicalResult | partiallyLowerFuncToComp (FuncOp funcOp, PatternRewriter &rewriter) const override |
LogicalResult | scheduleBasicBlock (PatternRewriter &rewriter, const DenseSet< Block * > &path, mlir::Block *parentCtrlBlock, mlir::Block *block) const |
Sequentially schedules the groups that registered themselves with 'block'. | |
LogicalResult | schedulePath (PatternRewriter &rewriter, const DenseSet< Block * > &path, Location loc, Block *from, Block *to, Block *parentCtrlBlock) const |
Schedules a block by inserting a branch argument assignment block (if any) before recursing into the scheduling of the block innards. | |
LogicalResult | buildCFGControl (DenseSet< Block * > path, PatternRewriter &rewriter, mlir::Block *parentCtrlBlock, mlir::Block *preBlock, mlir::Block *block) const |
calyx::WhileOp | buildWhileCtrlOp (PipelineWhileOp whileOp, SmallVector< calyx::GroupOp > initGroups, PatternRewriter &rewriter) const |
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 |
Builds a control schedule by traversing the CFG of the function and associating this with the previously created groups.
For simplicity, the generated control flow is expanded for all possible paths in the input DAG. This elaborated control flow is later reduced in the runControlFlowSimplification passes.
Definition at line 1196 of file LoopScheduleToCalyx.cpp.
|
inlineprivate |
TODO(mortbopet): we could choose to support ie. std.switch, but it would probably be easier to just require it to be lowered beforehand.
Wrap each branch inside an if/else.
Schedule sequentially within the current parent control block.
Definition at line 1290 of file LoopScheduleToCalyx.cpp.
References assert(), scheduleBasicBlock(), and schedulePath().
Referenced by partiallyLowerFuncToComp(), and schedulePath().
|
inlineprivate |
Insert while iter arg initialization group(s). Emit a parallel group to assign one or more registers all at once.
Insert the while op itself.
If a bound was specified, add it.
Definition at line 1354 of file LoopScheduleToCalyx.cpp.
References circt::pipelinetocalyx::PipelineWhileOp::getBound(), circt::pipelinetocalyx::PipelineWhileOp::getConditionValue(), circt::calyx::WhileOpInterface< T >::getLoc(), and circt::calyx::WhileOpInterface< T >::getOperation().
Referenced by scheduleBasicBlock().
|
inlineoverrideprivate |
Definition at line 1200 of file LoopScheduleToCalyx.cpp.
References buildCFGControl(), getBodyBlock(), and circt::calyx::FuncOpPartialLoweringPattern::getComponent().
|
inlineprivate |
Sequentially schedules the groups that registered themselves with 'block'.
Schedule pipeline stages in the parallel group directly.
Definition at line 1214 of file LoopScheduleToCalyx.cpp.
References buildWhileCtrlOp().
Referenced by buildCFGControl().
|
inlineprivate |
Schedules a block by inserting a branch argument assignment block (if any) before recursing into the scheduling of the block innards.
Blocks 'from' and 'to' refer to blocks in the source program. parentCtrlBlock refers to the control block wherein control operations are to be inserted.
Schedule any registered block arguments to be executed before the body of the branch.
Definition at line 1274 of file LoopScheduleToCalyx.cpp.
References buildCFGControl().
Referenced by buildCFGControl().