CIRCT
18.0.0git
|
Classes | |
struct | LoweringPattern |
Public Member Functions | |
SCFToCalyxPass () | |
void | runOnOperation () override |
LogicalResult | setTopLevelFunction (mlir::ModuleOp moduleOp, std::string &topLevelFunction) |
LogicalResult | labelEntryPoint (StringRef topLevelFunction) |
Labels the entry point of a Calyx program. More... | |
template<typename TPattern , typename... PatternArgs> | |
void | addOncePattern (SmallVectorImpl< LoweringPattern > &patterns, PatternArgs &&...args) |
'Once' patterns are expected to take an additional LogicalResult& argument, to forward their result state (greedyPatternRewriteDriver results are skipped for Once patterns). More... | |
template<typename TPattern , typename... PatternArgs> | |
void | addGreedyPattern (SmallVectorImpl< LoweringPattern > &patterns, PatternArgs &&...args) |
LogicalResult | runPartialPattern (RewritePatternSet &pattern, bool runOnce) |
Private Attributes | |
LogicalResult | partialPatternRes |
std::shared_ptr< calyx::CalyxLoweringState > | loweringState = nullptr |
Definition at line 1557 of file SCFToCalyx.cpp.
|
inline |
Definition at line 1559 of file SCFToCalyx.cpp.
|
inline |
Definition at line 1650 of file SCFToCalyx.cpp.
|
inline |
'Once' patterns are expected to take an additional LogicalResult& argument, to forward their result state (greedyPatternRewriteDriver results are skipped for Once patterns).
Definition at line 1641 of file SCFToCalyx.cpp.
|
inline |
Labels the entry point of a Calyx program.
Furthermore, this function performs validation on the input function, to ensure that we've implemented the capabilities necessary to convert it.
Definition at line 1599 of file SCFToCalyx.cpp.
References circt::calyx::applyModuleOpConversion().
|
override |
Start conversion
If you are a developer, it may be helpful to add a 'getOperation()->dump()' call after the execution of each stage to
A mapping is maintained between a function operation and its corresponding Calyx component.
Creates a new Calyx component for each FuncOp in the inpurt module.
This pass inlines scf.ExecuteRegionOp's by adding control-flow.
This pattern converts all index typed values to an i32 integer.
This pattern creates registers for all basic-block arguments.
This pattern creates registers for the function return values.
This pattern creates registers for iteration arguments of scf.while operations. Additionally, creates a group for assigning the initial value of the iteration argument registers.
This pattern creates registers for iteration arguments of scf.for operations. Additionally, creates a group for assigning the initial value of the iteration argument registers.
This pattern converts operations within basic blocks to Calyx library operators. Combinational operations are assigned inside a calyx::CombGroupOp, and sequential inside calyx::GroupOps. Sequential groups are registered with the Block* of which the operation originated from. This is used during control schedule generation. By having a distinct group for each operation, groups are analogous to SSA values in the source program.
This pattern traverses the CFG of the program and generates a control schedule based on the calyx::GroupOp's which were registered for each basic block in the source function.
This pass recursively inlines use-def chains of combinational logic (from non-stateful groups) into groups referenced in the control schedule.
This pattern performs various SSA replacements that must be done after control generation.
Eliminate any unused combinational groups. This is done before calyx::RewriteMemoryAccesses to avoid inferring slice components for groups that will be removed.
This pattern rewrites accesses to memories which are too wide due to index types being converted to a fixed-width integer type.
This pattern removes the source FuncOp which has now been converted into a Calyx component.
Sequentially apply each lowering pattern.
Definition at line 1684 of file SCFToCalyx.cpp.
References circt::calyx::direction::get(), and circt::calyx::getCiderSourceLocationMetadata().
|
inline |
Can't return applyPatternsAndFoldGreedily. Root isn't necessarily erased so it will always return failed(). Instead, forward the 'succeeded' value from PartialLoweringPatternBase.
Definition at line 1658 of file SCFToCalyx.cpp.
References assert().
|
inline |
No top level function set; infer top level if the module only contains a single function, else, throw error.
Definition at line 1563 of file SCFToCalyx.cpp.
|
private |
Definition at line 1681 of file SCFToCalyx.cpp.
|
private |
Definition at line 1680 of file SCFToCalyx.cpp.