#include "mlir/Dialect/Shape/Transforms/Passes.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Shape/IR/Shape.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
namespace mlir {
#define GEN_PASS_DEF_REMOVESHAPECONSTRAINTS
#include "mlir/Dialect/Shape/Transforms/Passes.h.inc"
}
usingnamespacemlir;
namespace {
class RemoveCstrBroadcastableOp
: public OpRewritePattern<shape::CstrBroadcastableOp> { … };
class RemoveCstrEqOp : public OpRewritePattern<shape::CstrEqOp> { … };
class RemoveShapeConstraintsPass
: public impl::RemoveShapeConstraintsBase<RemoveShapeConstraintsPass> { … };
}
void mlir::populateRemoveShapeConstraintsPatterns(RewritePatternSet &patterns) { … }
std::unique_ptr<OperationPass<func::FuncOp>>
mlir::createRemoveShapeConstraintsPass() { … }