CIRCT 20.0.0git
|
#include <CalyxLoweringUtils.h>
Public Member Functions | |
~LoopLoweringStateInterface ()=default | |
void | addLoopIterReg (Loop op, calyx::RegisterOp reg, unsigned idx) |
Register reg as being the idx'th iter_args register for 'op'. | |
calyx::RegisterOp | getLoopIterReg (Loop op, unsigned idx) |
Return a mapping of block argument indices to block argument. | |
const DenseMap< unsigned, calyx::RegisterOp > & | getLoopIterRegs (Loop op) |
Return a mapping of block argument indices to block argument. | |
void | setLoopLatchGroup (Loop op, calyx::GroupOp group) |
Registers grp to be the loop latch group of op . | |
calyx::GroupOp | getLoopLatchGroup (Loop op) |
Retrieve the loop latch group registered for op . | |
void | setLoopInitGroups (Loop op, SmallVector< calyx::GroupOp > groups) |
Registers groups to be the loop init groups of op . | |
SmallVector< calyx::GroupOp > | getLoopInitGroups (Loop op) |
Retrieve the loop init groups registered for op . | |
calyx::GroupOp | buildLoopIterArgAssignments (OpBuilder &builder, Loop op, calyx::ComponentOp componentOp, Twine uniqueSuffix, MutableArrayRef< OpOperand > ops) |
Creates a new group that assigns the 'ops' values to the iter arg registers of the loop operation. | |
Private Attributes | |
DenseMap< Operation *, DenseMap< unsigned, calyx::RegisterOp > > | loopIterRegs |
A mapping from loop ops to iteration argument registers. | |
DenseMap< Operation *, calyx::GroupOp > | loopLatchGroups |
A loop latch group is a group that should be sequentially executed when finishing a loop body. | |
DenseMap< Operation *, SmallVector< calyx::GroupOp > > | loopInitGroups |
Loop init groups are to be scheduled before the while operation. | |
Definition at line 240 of file CalyxLoweringUtils.h.
|
default |
|
inline |
Register reg as being the idx'th iter_args register for 'op'.
Definition at line 247 of file CalyxLoweringUtils.h.
References assert(), and circt::calyx::LoopLoweringStateInterface< Loop >::loopIterRegs.
|
inline |
Creates a new group that assigns the 'ops' values to the iter arg registers of the loop operation.
Pass iteration arguments through registers. This follows closely to what is done for branch ops.
Create register assignment for each iter_arg. a calyx::GroupDone signal is created for each register. These will be &'ed together in MultipleGroupDonePattern.
Definition at line 303 of file CalyxLoweringUtils.h.
References circt::calyx::buildAssignmentsForRegisterWrite(), and circt::calyx::LoopLoweringStateInterface< Loop >::getLoopIterReg().
|
inline |
Retrieve the loop init groups registered for op
.
Definition at line 294 of file CalyxLoweringUtils.h.
References assert(), and circt::calyx::LoopLoweringStateInterface< Loop >::loopInitGroups.
|
inline |
Return a mapping of block argument indices to block argument.
Definition at line 256 of file CalyxLoweringUtils.h.
References assert(), and circt::calyx::LoopLoweringStateInterface< Loop >::getLoopIterRegs().
Referenced by circt::calyx::LoopLoweringStateInterface< Loop >::buildLoopIterArgAssignments().
|
inline |
Return a mapping of block argument indices to block argument.
Definition at line 265 of file CalyxLoweringUtils.h.
References circt::calyx::LoopLoweringStateInterface< Loop >::loopIterRegs.
Referenced by circt::calyx::LoopLoweringStateInterface< Loop >::getLoopIterReg().
|
inline |
Retrieve the loop latch group registered for op
.
Definition at line 278 of file CalyxLoweringUtils.h.
References assert(), and circt::calyx::LoopLoweringStateInterface< Loop >::loopLatchGroups.
|
inline |
Registers groups to be the loop init groups of op
.
Definition at line 286 of file CalyxLoweringUtils.h.
References assert(), and circt::calyx::LoopLoweringStateInterface< Loop >::loopInitGroups.
|
inline |
Registers grp to be the loop latch group of op
.
Definition at line 270 of file CalyxLoweringUtils.h.
References assert(), and circt::calyx::LoopLoweringStateInterface< Loop >::loopLatchGroups.
|
private |
Loop init groups are to be scheduled before the while operation.
These groups should set the initial value(s) of the loop init_args register(s).
Definition at line 334 of file CalyxLoweringUtils.h.
Referenced by circt::calyx::LoopLoweringStateInterface< Loop >::getLoopInitGroups(), and circt::calyx::LoopLoweringStateInterface< Loop >::setLoopInitGroups().
|
private |
A mapping from loop ops to iteration argument registers.
Definition at line 325 of file CalyxLoweringUtils.h.
Referenced by circt::calyx::LoopLoweringStateInterface< Loop >::addLoopIterReg(), and circt::calyx::LoopLoweringStateInterface< Loop >::getLoopIterRegs().
|
private |
A loop latch group is a group that should be sequentially executed when finishing a loop body.
The execution of this group will write the yield'ed loop body values to the iteration argument registers.
Definition at line 330 of file CalyxLoweringUtils.h.
Referenced by circt::calyx::LoopLoweringStateInterface< Loop >::getLoopLatchGroup(), and circt::calyx::LoopLoweringStateInterface< Loop >::setLoopLatchGroup().