19#define GEN_PASS_DEF_CONVERTSHAPECONSTRAINTSPASS
20#include "mlir/Conversion/Passes.h.inc"
26#include "ShapeToStandard.cpp.inc"
33 LogicalResult matchAndRewrite(shape::CstrRequireOp op,
34 PatternRewriter &rewriter)
const override {
35 cf::AssertOp::create(rewriter, op.getLoc(), op.getPred(), op.getMsgAttr());
54class ConvertShapeConstraints
56 void runOnOperation()
override {
57 auto *
func = getOperation();
64 return signalPassFailure();
OpTy replaceOpWithNewOp(Operation *op, Args &&...args)
Replace the results of the given (original) op with a new op that is created without verification (re...
Include the generated interface declarations.
LogicalResult applyPatternsGreedily(Region ®ion, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
Rewrite ops in the given region, which must be isolated from above, by repeatedly applying the highes...
const FrozenRewritePatternSet & patterns
void populateConvertShapeConstraintsConversionPatterns(RewritePatternSet &patterns)
OpRewritePattern is a wrapper around RewritePattern that allows for matching and rewriting against an...
OpRewritePattern(MLIRContext *context, PatternBenefit benefit=1, ArrayRef< StringRef > generatedNames={})
Patterns must specify the root operation name they match against, and can also specify the benefit of...