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'. More... | |
calyx::RegisterOp | getLoopIterReg (Loop op, unsigned idx) |
Return a mapping of block argument indices to block argument. More... | |
const DenseMap< unsigned, calyx::RegisterOp > & | getLoopIterRegs (Loop op) |
Return a mapping of block argument indices to block argument. More... | |
void | setLoopLatchGroup (Loop op, calyx::GroupOp group) |
Registers grp to be the loop latch group of op . More... | |
calyx::GroupOp | getLoopLatchGroup (Loop op) |
Retrieve the loop latch group registered for op . More... | |
void | setLoopInitGroups (Loop op, SmallVector< calyx::GroupOp > groups) |
Registers groups to be the loop init groups of op . More... | |
SmallVector< calyx::GroupOp > | getLoopInitGroups (Loop op) |
Retrieve the loop init groups registered for op . More... | |
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. More... | |
Private Attributes | |
DenseMap< Operation *, DenseMap< unsigned, calyx::RegisterOp > > | loopIterRegs |
A mapping from loop ops to iteration argument registers. More... | |
DenseMap< Operation *, calyx::GroupOp > | loopLatchGroups |
A loop latch group is a group that should be sequentially executed when finishing a loop body. More... | |
DenseMap< Operation *, SmallVector< calyx::GroupOp > > | loopInitGroups |
Loop init groups are to be scheduled before the while operation. More... | |
Definition at line 237 of file CalyxLoweringUtils.h.
|
default |
|
inline |
Register reg as being the idx'th iter_args register for 'op'.
Definition at line 244 of file CalyxLoweringUtils.h.
References assert(), circt::calyx::LoopLoweringStateInterface< Loop >::loopIterRegs, and seq::reg().
|
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 300 of file CalyxLoweringUtils.h.
References circt::calyx::buildAssignmentsForRegisterWrite(), circt::calyx::LoopLoweringStateInterface< Loop >::getLoopIterReg(), and seq::reg().
|
inline |
Retrieve the loop init groups registered for op
.
Definition at line 291 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 253 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 262 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 275 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 283 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 267 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 331 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 322 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 327 of file CalyxLoweringUtils.h.
Referenced by circt::calyx::LoopLoweringStateInterface< Loop >::getLoopLatchGroup(), and circt::calyx::LoopLoweringStateInterface< Loop >::setLoopLatchGroup().