21 using OpRewritePattern<scf::WhileOp>::OpRewritePattern;
23 LogicalResult matchAndRewrite(scf::WhileOp whileOp,
24 PatternRewriter &rewriter)
const final {
27 constexpr bool forceCreateCheck =
false;
28 FailureOr<scf::WhileOp>
result =
MLIRContext * getContext() const
RewritePatternSet & add(ConstructorArg &&arg, ConstructorArgs &&...args)
Add an instance of each of the pattern types 'Ts' to the pattern list with the given arguments.
FailureOr< WhileOp > wrapWhileLoopInZeroTripCheck(WhileOp whileOp, RewriterBase &rewriter, bool forceCreateCheck=false)
Create zero-trip-check around a while op and return the new loop op in the check.
void populateSCFRotateWhileLoopPatterns(RewritePatternSet &patterns)
Populate patterns to rotate scf.while ops, constructing do-while loops from while loops.
Include the generated interface declarations.
OpRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an...