CIRCT  20.0.0git
Public Member Functions | Private Attributes | List of all members
circt::calyx::PartialLoweringPattern< OpType, RewritePatternType > Class Template Referenceabstract

Base class for partial lowering passes. More...

#include <CalyxLoweringUtils.h>

Inheritance diagram for circt::calyx::PartialLoweringPattern< OpType, RewritePatternType >:
Inheritance graph
[legend]
Collaboration diagram for circt::calyx::PartialLoweringPattern< OpType, RewritePatternType >:
Collaboration graph
[legend]

Public Member Functions

 PartialLoweringPattern (MLIRContext *ctx, LogicalResult &resRef, PatternApplicationState &patternState)
 
LogicalResult matchAndRewrite (OpType op, PatternRewriter &rewriter) const override
 
virtual LogicalResult partiallyLower (OpType op, PatternRewriter &rewriter) const =0
 

Private Attributes

LogicalResult & partialPatternRes
 
PatternApplicationStatepatternState
 

Detailed Description

template<class OpType, template< class > class RewritePatternType = OpRewritePattern>
class circt::calyx::PartialLoweringPattern< OpType, RewritePatternType >

Base class for partial lowering passes.

A partial lowering pass modifies the root operation in place, but does not replace the root operation. The RewritePatternType template parameter allows for using both OpRewritePattern (default) or OpInterfaceRewritePattern.

Definition at line 535 of file CalyxLoweringUtils.h.

Constructor & Destructor Documentation

◆ PartialLoweringPattern()

template<class OpType , template< class > class RewritePatternType = OpRewritePattern>
circt::calyx::PartialLoweringPattern< OpType, RewritePatternType >::PartialLoweringPattern ( MLIRContext *  ctx,
LogicalResult &  resRef,
PatternApplicationState patternState 
)
inline

Definition at line 538 of file CalyxLoweringUtils.h.

Member Function Documentation

◆ matchAndRewrite()

template<class OpType , template< class > class RewritePatternType = OpRewritePattern>
LogicalResult circt::calyx::PartialLoweringPattern< OpType, RewritePatternType >::matchAndRewrite ( OpType  op,
PatternRewriter &  rewriter 
) const
inlineoverride

◆ partiallyLower()

template<class OpType , template< class > class RewritePatternType = OpRewritePattern>
virtual LogicalResult circt::calyx::PartialLoweringPattern< OpType, RewritePatternType >::partiallyLower ( OpType  op,
PatternRewriter &  rewriter 
) const
pure virtual

Member Data Documentation

◆ partialPatternRes

template<class OpType , template< class > class RewritePatternType = OpRewritePattern>
LogicalResult& circt::calyx::PartialLoweringPattern< OpType, RewritePatternType >::partialPatternRes
private

◆ patternState

template<class OpType , template< class > class RewritePatternType = OpRewritePattern>
PatternApplicationState& circt::calyx::PartialLoweringPattern< OpType, RewritePatternType >::patternState
private

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