CIRCT  20.0.0git
Public Member Functions | List of all members
circt::scftocalyx::ComponentLoweringState Class Reference

Handles the current state of lowering of a Calyx component. More...

Inheritance diagram for circt::scftocalyx::ComponentLoweringState:
Inheritance graph
[legend]
Collaboration diagram for circt::scftocalyx::ComponentLoweringState:
Collaboration graph
[legend]

Public Member Functions

 ComponentLoweringState (calyx::ComponentOp component)
 
- Public Member Functions inherited from circt::calyx::ComponentLoweringStateInterface
 ComponentLoweringStateInterface (calyx::ComponentOp component)
 
 ~ComponentLoweringStateInterface ()
 
calyx::ComponentOp getComponentOp ()
 Returns the calyx::ComponentOp associated with this lowering state. More...
 
void addBlockArgReg (Block *block, calyx::RegisterOp reg, unsigned idx)
 Register reg as being the idx'th argument register for block. More...
 
const DenseMap< unsigned, calyx::RegisterOp > & getBlockArgRegs (Block *block)
 Return a mapping of block argument indices to block argument registers. More...
 
void addBlockArgGroup (Block *from, Block *to, calyx::GroupOp grp)
 Register 'grp' as a group which performs block argument register transfer when transitioning from basic block 'from' to 'to'. More...
 
ArrayRef< calyx::GroupOp > getBlockArgGroups (Block *from, Block *to)
 Returns a list of groups to be evaluated to perform the block argument register assignments when transitioning from basic block 'from' to 'to'. More...
 
std::string getUniqueName (StringRef prefix)
 Returns a unique name within compOp with the provided prefix. More...
 
StringRef getUniqueName (Operation *op)
 Returns a unique name associated with a specific operation. More...
 
void setUniqueName (Operation *op, StringRef prefix)
 Registers a unique name for a given operation using a provided prefix. More...
 
void registerEvaluatingGroup (Value v, calyx::GroupInterface group)
 Register value v as being evaluated when scheduling group. More...
 
void addReturnReg (calyx::RegisterOp reg, unsigned idx)
 Register reg as being the idx'th return value register. More...
 
calyx::RegisterOp getReturnReg (unsigned idx)
 Returns the idx'th return value register. More...
 
void registerMemoryInterface (Value memref, const calyx::MemoryInterface &memoryInterface)
 Registers a memory interface as being associated with a memory identified by 'memref'. More...
 
calyx::MemoryInterface getMemoryInterface (Value memref)
 Returns the memory interface registered for the given memref. More...
 
std::optional< calyx::MemoryInterfaceisInputPortOfMemory (Value v)
 If v is an input to any memory registered within this component, returns the memory. More...
 
void setFuncOpResultMapping (const DenseMap< unsigned, unsigned > &mapping)
 Assign a mapping between the source funcOp result indices and the corresponding output port indices of this componentOp. More...
 
unsigned getFuncOpResultMapping (unsigned funcReturnIdx)
 Get the output port index of this component for which the funcReturnIdx of the original function maps to. More...
 
InstanceOp getInstance (StringRef calleeName)
 The instance is obtained from the name of the callee. More...
 
void addInstance (StringRef calleeName, InstanceOp instanceOp)
 Put the name of the callee and the instance of the call into map. More...
 
template<typename TGroupOp = calyx::GroupInterface>
TGroupOp getEvaluatingGroup (Value v)
 Return the group which evaluates the value v. More...
 
template<typename TLibraryOp >
TLibraryOp getNewLibraryOpInstance (OpBuilder &builder, Location loc, TypeRange resTypes)
 
- Public Member Functions inherited from circt::scftocalyx::WhileLoopLoweringStateInterface
SmallVector< calyx::GroupOp > getWhileLoopInitGroups (ScfWhileOp op)
 
calyx::GroupOp buildWhileLoopIterArgAssignments (OpBuilder &builder, ScfWhileOp op, calyx::ComponentOp componentOp, Twine uniqueSuffix, MutableArrayRef< OpOperand > ops)
 
void addWhileLoopIterReg (ScfWhileOp op, calyx::RegisterOp reg, unsigned idx)
 
const DenseMap< unsigned, calyx::RegisterOp > & getWhileLoopIterRegs (ScfWhileOp op)
 
void setWhileLoopLatchGroup (ScfWhileOp op, calyx::GroupOp group)
 
calyx::GroupOp getWhileLoopLatchGroup (ScfWhileOp op)
 
void setWhileLoopInitGroups (ScfWhileOp op, SmallVector< calyx::GroupOp > groups)
 
- Public Member Functions inherited from circt::scftocalyx::ForLoopLoweringStateInterface
SmallVector< calyx::GroupOp > getForLoopInitGroups (ScfForOp op)
 
calyx::GroupOp buildForLoopIterArgAssignments (OpBuilder &builder, ScfForOp op, calyx::ComponentOp componentOp, Twine uniqueSuffix, MutableArrayRef< OpOperand > ops)
 
void addForLoopIterReg (ScfForOp op, calyx::RegisterOp reg, unsigned idx)
 
const DenseMap< unsigned, calyx::RegisterOp > & getForLoopIterRegs (ScfForOp op)
 
calyx::RegisterOp getForLoopIterReg (ScfForOp op, unsigned idx)
 
void setForLoopLatchGroup (ScfForOp op, calyx::GroupOp group)
 
calyx::GroupOp getForLoopLatchGroup (ScfForOp op)
 
void setForLoopInitGroups (ScfForOp op, SmallVector< calyx::GroupOp > groups)
 
- Public Member Functions inherited from circt::scftocalyx::IfLoweringStateInterface
void setThenGroup (scf::IfOp op, calyx::GroupOp group)
 
calyx::GroupOp getThenGroup (scf::IfOp op)
 
void setElseGroup (scf::IfOp op, calyx::GroupOp group)
 
calyx::GroupOp getElseGroup (scf::IfOp op)
 
void setResultRegs (scf::IfOp op, calyx::RegisterOp reg, unsigned idx)
 
const DenseMap< unsigned, calyx::RegisterOp > & getResultRegs (scf::IfOp op)
 
calyx::RegisterOp getResultRegs (scf::IfOp op, unsigned idx)
 
- 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'. More...
 
SmallVector< ScheduleablegetBlockScheduleables (mlir::Block *block)
 Returns an ordered list of schedulables which registered themselves to be a result of lowering the block in the source program. More...
 

Detailed Description

Handles the current state of lowering of a Calyx component.

It is mainly used as a key/value store for recording information during partial lowering, which is required at later lowering passes.

Definition at line 247 of file SCFToCalyx.cpp.

Constructor & Destructor Documentation

◆ ComponentLoweringState()

circt::scftocalyx::ComponentLoweringState::ComponentLoweringState ( calyx::ComponentOp  component)
inline

Definition at line 253 of file SCFToCalyx.cpp.


The documentation for this class was generated from the following file: