CIRCT
18.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'. More... | |
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. More... | |
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 | |
![]() | |
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 |
![]() | |
PartialLoweringPattern (MLIRContext *ctx, LogicalResult &resRef, PatternApplicationState &patternState) | |
LogicalResult | matchAndRewrite (mlir::func::FuncOp op, PatternRewriter &rewriter) const override |
![]() | |
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 1148 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 1242 of file LoopScheduleToCalyx.cpp.
References assert(), and circt::calyx::direction::get().
|
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 1306 of file LoopScheduleToCalyx.cpp.
References circt::calyx::direction::get(), circt::pipelinetocalyx::PipelineWhileOp::getBound(), circt::pipelinetocalyx::PipelineWhileOp::getConditionValue(), circt::calyx::WhileOpInterface< T >::getLoc(), and circt::calyx::WhileOpInterface< T >::getOperation().
|
inlineoverrideprivate |
Definition at line 1152 of file LoopScheduleToCalyx.cpp.
|
inlineprivate |
Sequentially schedules the groups that registered themselves with 'block'.
Schedule pipeline stages in the parallel group directly.
Definition at line 1166 of file LoopScheduleToCalyx.cpp.
|
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 1226 of file LoopScheduleToCalyx.cpp.