CIRCT 22.0.0git
|
Public Member Functions | |
ReductionCat (MLIRContext *context, llvm::StringLiteral opName) | |
virtual bool | handleConstant (mlir::PatternRewriter &rewriter, Operation *op, ConstantOp constantOp, SmallVectorImpl< Value > &remaining) const =0 |
Handle a constant operand in the cat operation. | |
virtual bool | getIdentityValue () const =0 |
Return the unit value for this reduction operation: | |
LogicalResult | matchAndRewrite (Operation *op, mlir::PatternRewriter &rewriter) const override |
Definition at line 1115 of file FIRRTLFolds.cpp.
|
inline |
Definition at line 1117 of file FIRRTLFolds.cpp.
|
pure virtual |
Return the unit value for this reduction operation:
Implemented in OrRCat, AndRCat, and XorRCat.
Referenced by matchAndRewrite().
|
pure virtual |
Handle a constant operand in the cat operation.
Returns true if the entire reduction can be replaced with a constant. May add non-zero constants to the remaining operands list.
Implemented in OrRCat, AndRCat, and XorRCat.
Referenced by matchAndRewrite().
|
inlineoverride |
Definition at line 1131 of file FIRRTLFolds.cpp.
References getIdentityValue(), and handleConstant().