17#define GEN_PASS_DEF_REMOVESHAPECONSTRAINTSPASS
18#include "mlir/Dialect/Shape/Transforms/Passes.h.inc"
25class RemoveCstrBroadcastableOp
30 LogicalResult matchAndRewrite(shape::CstrBroadcastableOp op,
31 PatternRewriter &rewriter)
const override {
41 LogicalResult matchAndRewrite(shape::CstrEqOp op,
42 PatternRewriter &rewriter)
const override {
49class RemoveShapeConstraintsPass
52 void runOnOperation()
override {
65 patterns.add<RemoveCstrBroadcastableOp, RemoveCstrEqOp>(
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 populateRemoveShapeConstraintsPatterns(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...