CIRCT  20.0.0git
Private Member Functions | List of all members
circt::scftocalyx::InlineExecuteRegionOpPattern Class Reference

Inlines Calyx ExecuteRegionOp operations within their parent blocks. More...

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

Private Member Functions

LogicalResult matchAndRewrite (scf::ExecuteRegionOp execOp, PatternRewriter &rewriter) const override
 

Detailed Description

Inlines Calyx ExecuteRegionOp operations within their parent blocks.

An execution region op (ERO) is inlined by: i : add a sink basic block for all yield operations inside the ERO to jump to ii : Rewrite scf.yield calls inside the ERO to branch to the sink block iii: inline the ERO region TODO(#1850) evaluate the usefulness of this lowering pattern.

Definition at line 1499 of file SCFToCalyx.cpp.

Member Function Documentation

◆ matchAndRewrite()

LogicalResult circt::scftocalyx::InlineExecuteRegionOpPattern::matchAndRewrite ( scf::ExecuteRegionOp  execOp,
PatternRewriter &  rewriter 
) const
inlineoverrideprivate

Determine type of "yield" operations inside the ERO.

Create sink basic block and rewrite uses of yield results to sink block arguments.

Rewrite yield calls as branches.

Inline the regionOp.

Finally, erase the unused entry block of the execOp region.

Definition at line 1503 of file SCFToCalyx.cpp.


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