CIRCT 20.0.0git
|
Holds additional information required for scheduling Pipeline pipelines. More...
Public Member Functions | |
void | registerNonPipelineOperations (Operation *op, calyx::GroupInterface group) |
Registers operations that may be used in a pipeline, but does not produce a value to be used in a further stage. | |
template<typename TGroupOp = calyx::GroupInterface> | |
std::optional< TGroupOp > | getNonPipelinedGroupFrom (Operation *op) |
Returns the group registered for this non-pipelined value, and None otherwise. | |
void | addPipelineReg (Operation *stage, calyx::RegisterOp reg, unsigned idx) |
Register reg as being the idx'th pipeline register for the stage. | |
const DenseMap< unsigned, calyx::RegisterOp > & | getPipelineRegs (Operation *stage) |
Return a mapping of stage result indices to pipeline registers. | |
std::optional< calyx::RegisterOp > | getPipelineRegister (Value value) |
Returns the pipeline register for this value if its defining operation is a stage, and std::nullopt otherwise. | |
void | addPipelinePrologue (Operation *op, SmallVector< StringAttr > groupNames) |
Add a stage's groups to the pipeline prologue. | |
void | addPipelineEpilogue (Operation *op, SmallVector< StringAttr > groupNames) |
Add a stage's groups to the pipeline epilogue. | |
SmallVector< SmallVector< StringAttr > > | getPipelinePrologue (Operation *op) |
Get the pipeline prologue. | |
void | createPipelinePrologue (Operation *op, PatternRewriter &rewriter) |
Create the pipeline prologue. | |
void | createPipelineEpilogue (Operation *op, PatternRewriter &rewriter) |
Create the pipeline epilogue. | |
Public Member Functions inherited from circt::calyx::SchedulerInterface< Scheduleable > | |
void | addBlockScheduleable (mlir::Block *block, const Scheduleable &scheduleable) |
Register 'scheduleable' as being generated through lowering 'block'. | |
SmallVector< Scheduleable > | getBlockScheduleables (mlir::Block *block) |
Returns an ordered list of schedulables which registered themselves to be a result of lowering the block in the source program. | |
Private Attributes | |
DenseMap< Operation *, calyx::GroupInterface > | operationToGroup |
A mapping between operations and the group to which it was assigned. | |
DenseMap< Operation *, DenseMap< unsigned, calyx::RegisterOp > > | pipelineRegs |
A mapping from pipeline stages to their registers. | |
DenseMap< Operation *, SmallVector< SmallVector< StringAttr > > > | pipelinePrologue |
A mapping from pipeline ops to a vector of vectors of group names that constitute the pipeline prologue. | |
DenseMap< Operation *, SmallVector< SmallVector< StringAttr > > > | pipelineEpilogue |
A mapping from pipeline ops to a vector of vectors of group names that constitute the pipeline epilogue. | |
Holds additional information required for scheduling Pipeline pipelines.
Definition at line 92 of file LoopScheduleToCalyx.cpp.
|
inline |
Add a stage's groups to the pipeline epilogue.
Definition at line 149 of file LoopScheduleToCalyx.cpp.
References pipelineEpilogue.
|
inline |
Add a stage's groups to the pipeline prologue.
Definition at line 144 of file LoopScheduleToCalyx.cpp.
References pipelinePrologue.
|
inline |
Register reg as being the idx'th pipeline register for the stage.
Definition at line 118 of file LoopScheduleToCalyx.cpp.
References assert(), and pipelineRegs.
|
inline |
Create the pipeline epilogue.
Definition at line 172 of file LoopScheduleToCalyx.cpp.
References pipelineEpilogue.
|
inline |
Create the pipeline prologue.
Definition at line 159 of file LoopScheduleToCalyx.cpp.
References pipelinePrologue.
|
inline |
Returns the group registered for this non-pipelined value, and None otherwise.
Definition at line 104 of file LoopScheduleToCalyx.cpp.
References assert(), and operationToGroup.
|
inline |
Get the pipeline prologue.
Definition at line 154 of file LoopScheduleToCalyx.cpp.
References pipelinePrologue.
|
inline |
Returns the pipeline register for this value if its defining operation is a stage, and std::nullopt otherwise.
Definition at line 132 of file LoopScheduleToCalyx.cpp.
References getPipelineRegs().
|
inline |
Return a mapping of stage result indices to pipeline registers.
Definition at line 126 of file LoopScheduleToCalyx.cpp.
References pipelineRegs.
Referenced by getPipelineRegister().
|
inline |
Registers operations that may be used in a pipeline, but does not produce a value to be used in a further stage.
Definition at line 96 of file LoopScheduleToCalyx.cpp.
References operationToGroup.
|
private |
A mapping between operations and the group to which it was assigned.
This is used for specific corner cases, such as pipeline stages that may not actually pipeline any values.
Definition at line 188 of file LoopScheduleToCalyx.cpp.
Referenced by getNonPipelinedGroupFrom(), and registerNonPipelineOperations().
|
private |
A mapping from pipeline ops to a vector of vectors of group names that constitute the pipeline epilogue.
Each inner vector consists of the groups for one stage.
Definition at line 201 of file LoopScheduleToCalyx.cpp.
Referenced by addPipelineEpilogue(), and createPipelineEpilogue().
|
private |
A mapping from pipeline ops to a vector of vectors of group names that constitute the pipeline prologue.
Each inner vector consists of the groups for one stage.
Definition at line 196 of file LoopScheduleToCalyx.cpp.
Referenced by addPipelinePrologue(), createPipelinePrologue(), and getPipelinePrologue().
|
private |
A mapping from pipeline stages to their registers.
Definition at line 191 of file LoopScheduleToCalyx.cpp.
Referenced by addPipelineReg(), and getPipelineRegs().