23 LogicalResult matchAndRewrite(scf::WhileOp whileOp,
27 constexpr
bool forceCreateCheck =
false;
28 FailureOr<scf::WhileOp> result =
33 return success(succeeded(result) && *result != whileOp);
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current I...
void populateSCFRotateWhileLoopPatterns(RewritePatternSet &patterns)
Populate patterns to rotate scf.while ops, constructing do-while loops from while loops.
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.
Include the generated interface declarations.
const FrozenRewritePatternSet & patterns
OpRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an...