CIRCT
19.0.0git
|
Iterate through the operations of a source function and instantiate components or primitives based on the type of the operations. More...
Private Member Functions | |
LogicalResult | partiallyLowerFuncToComp (FuncOp funcOp, PatternRewriter &rewriter) const override |
LogicalResult | buildOp (PatternRewriter &rewriter, scf::YieldOp yieldOp) const |
Op builder specializations. More... | |
LogicalResult | buildOp (PatternRewriter &rewriter, BranchOpInterface brOp) const |
LogicalResult | buildOp (PatternRewriter &rewriter, arith::ConstantOp constOp) const |
LogicalResult | buildOp (PatternRewriter &rewriter, SelectOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, AddIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, SubIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, MulIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, DivUIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, DivSIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, RemUIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, RemSIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, ShRUIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, ShRSIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, ShLIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, AndIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, OrIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, XOrIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, CmpIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, TruncIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, ExtUIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, ExtSIOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, ReturnOp op) const |
For each return statement, we create a new group for assigning to the previously created return value registers. More... | |
LogicalResult | buildOp (PatternRewriter &rewriter, IndexCastOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, memref::AllocOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, memref::AllocaOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, memref::LoadOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, memref::StoreOp op) const |
LogicalResult | buildOp (PatternRewriter &rewriter, scf::WhileOp whileOp) const |
LogicalResult | buildOp (PatternRewriter &rewriter, scf::ForOp forOp) const |
LogicalResult | buildOp (PatternRewriter &rewriter, CallOp callOp) const |
template<typename TGroupOp , typename TCalyxLibOp , typename TSrcOp > | |
LogicalResult | buildLibraryOp (PatternRewriter &rewriter, TSrcOp op, TypeRange srcTypes, TypeRange dstTypes) const |
buildLibraryOp will build a TCalyxLibOp inside a TGroupOp based on the source operation TSrcOp. More... | |
template<typename TGroupOp , typename TCalyxLibOp , typename TSrcOp > | |
LogicalResult | buildLibraryOp (PatternRewriter &rewriter, TSrcOp op) const |
buildLibraryOp which provides in- and output types based on the operands and results of the op argument. More... | |
template<typename TGroupOp > | |
TGroupOp | createGroupForOp (PatternRewriter &rewriter, Operation *op) const |
Creates a group named by the basic block which the input op resides in. More... | |
template<typename TOpType , typename TSrcOp > | |
LogicalResult | buildLibraryBinaryPipeOp (PatternRewriter &rewriter, TSrcOp op, TOpType opPipe, Value out) const |
buildLibraryBinaryPipeOp will build a TCalyxLibBinaryPipeOp, to deal with MulIOp, DivUIOp and RemUIOp. More... | |
void | assignAddressPorts (PatternRewriter &rewriter, Location loc, calyx::GroupInterface group, calyx::MemoryInterface memoryInterface, Operation::operand_range addressValues) const |
Creates assignments within the provided group to the address ports of the memoryOp based on the provided addressValues. More... | |
Additional Inherited Members | |
Public Member Functions inherited from circt::calyx::FuncOpPartialLoweringPattern | |
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 |
Public Member Functions inherited from circt::calyx::PartialLoweringPattern< mlir::func::FuncOp > | |
PartialLoweringPattern (MLIRContext *ctx, LogicalResult &resRef, PatternApplicationState &patternState) | |
LogicalResult | matchAndRewrite (mlir::func::FuncOp op, PatternRewriter &rewriter) const override |
Protected Attributes inherited from circt::calyx::FuncOpPartialLoweringPattern | |
DenseMap< mlir::func::FuncOp, calyx::ComponentOp > & | functionMapping |
Iterate through the operations of a source function and instantiate components or primitives based on the type of the operations.
Definition at line 198 of file SCFToCalyx.cpp.
|
inlineprivate |
Creates assignments within the provided group to the address ports of the memoryOp based on the provided addressValues.
Definition at line 384 of file SCFToCalyx.cpp.
References circt::calyx::MemoryInterface::addrPorts(), assert(), and circt::calyx::createConstant().
|
inlineprivate |
buildLibraryBinaryPipeOp will build a TCalyxLibBinaryPipeOp, to deal with MulIOp, DivUIOp and RemUIOp.
Definition at line 339 of file SCFToCalyx.cpp.
References builder, circt::calyx::createConstant(), circt::comb::createOrFoldNot(), circt::calyx::createRegister(), seq::reg(), and width.
|
inlineprivate |
buildLibraryOp which provides in- and output types based on the operands and results of the op argument.
Definition at line 320 of file SCFToCalyx.cpp.
|
inlineprivate |
buildLibraryOp will build a TCalyxLibOp inside a TGroupOp based on the source operation TSrcOp.
Create assignments to the inputs of the library op.
Replace the result values of the source operator with the new operator.
Definition at line 276 of file SCFToCalyx.cpp.
|
private |
Definition at line 807 of file SCFToCalyx.cpp.
|
private |
Definition at line 827 of file SCFToCalyx.cpp.
|
private |
Move constant operations to the compOp body as hw::ConstantOp's.
Definition at line 796 of file SCFToCalyx.cpp.
References circt::calyx::matchConstantOp().
|
private |
Branch argument passing group creation Branch operands are passed through registers. In BuildBasicBlockRegs we created registers for all branch arguments of each block. We now create groups for assigning values to these registers.
Register the group as a block argument group, to be executed when entering the successor block from this block (srcBlock).
Definition at line 738 of file SCFToCalyx.cpp.
References circt::calyx::buildAssignmentsForRegisterWrite(), and seq::reg().
|
private |
Definition at line 944 of file SCFToCalyx.cpp.
References circt::calyx::getInstanceName(), and Output.
|
private |
Definition at line 844 of file SCFToCalyx.cpp.
|
private |
Definition at line 565 of file SCFToCalyx.cpp.
References width.
|
private |
Definition at line 552 of file SCFToCalyx.cpp.
References width.
|
private |
Definition at line 881 of file SCFToCalyx.cpp.
|
private |
Definition at line 875 of file SCFToCalyx.cpp.
|
private |
Drop the index cast and replace uses of the target value with the source value.
pad/slice the source operand.
Definition at line 887 of file SCFToCalyx.cpp.
References circt::calyx::convIndexType().
|
private |
Definition at line 639 of file SCFToCalyx.cpp.
References circt::scftocalyx::buildAllocOp().
|
private |
Definition at line 634 of file SCFToCalyx.cpp.
References circt::scftocalyx::buildAllocOp().
|
private |
Definition at line 411 of file SCFToCalyx.cpp.
References circt::calyx::createConstant(), circt::calyx::createRegister(), circt::calyx::noStoresToMemory(), seq::reg(), and circt::calyx::singleLoadFromMemory().
|
private |
Definition at line 510 of file SCFToCalyx.cpp.
References circt::calyx::createConstant().
|
private |
Definition at line 539 of file SCFToCalyx.cpp.
References width.
|
private |
Definition at line 831 of file SCFToCalyx.cpp.
|
private |
Definition at line 591 of file SCFToCalyx.cpp.
References width.
|
private |
Definition at line 578 of file SCFToCalyx.cpp.
References width.
|
private |
For each return statement, we create a new group for assigning to the previously created return value registers.
Schedule group for execution for when executing the return op block.
Definition at line 775 of file SCFToCalyx.cpp.
References circt::calyx::buildAssignmentsForRegisterWrite(), and seq::reg().
|
private |
Definition at line 922 of file SCFToCalyx.cpp.
References circt::scftocalyx::ScfForOp::getBound(), and circt::calyx::RepeatOpInterface< T >::getOperation().
|
private |
Definition at line 912 of file SCFToCalyx.cpp.
|
private |
Op builder specializations.
Definition at line 644 of file SCFToCalyx.cpp.
References assert(), circt::calyx::buildAssignmentsForRegisterWrite(), circt::calyx::createConstant(), Input, and Output.
|
private |
Definition at line 839 of file SCFToCalyx.cpp.
|
private |
Definition at line 823 of file SCFToCalyx.cpp.
|
private |
Definition at line 819 of file SCFToCalyx.cpp.
|
private |
Definition at line 815 of file SCFToCalyx.cpp.
|
private |
Definition at line 811 of file SCFToCalyx.cpp.
|
private |
Definition at line 870 of file SCFToCalyx.cpp.
|
private |
Definition at line 835 of file SCFToCalyx.cpp.
|
inlineprivate |
Creates a group named by the basic block which the input op resides in.
Definition at line 327 of file SCFToCalyx.cpp.
|
inlineoverrideprivate |
We walk the operations of the funcOp to ensure that all def's have been visited before their uses.
SCF
memref
standard arithmetic
Skip: these special cases will be handled separately.
Definition at line 202 of file SCFToCalyx.cpp.