19 #define GEN_PASS_DEF_CONVERTSHAPECONSTRAINTSPASS
20 #include "mlir/Conversion/Passes.h.inc"
26 #include "ShapeToStandard.cpp.inc"
33 LogicalResult matchAndRewrite(shape::CstrRequireOp op,
35 cf::AssertOp::create(rewriter, op.getLoc(), op.getPred(), op.getMsgAttr());
54 class ConvertShapeConstraints
55 :
public impl::ConvertShapeConstraintsPassBase<ConvertShapeConstraints> {
56 void runOnOperation()
override {
57 auto *func = getOperation();
64 return signalPassFailure();
static MLIRContext * getContext(OpFoldResult val)
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current I...
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...