diff --git a/mlir/include/mlir/Dialect/Arith/Transforms/Passes.h b/mlir/include/mlir/Dialect/Arith/Transforms/Passes.h index a8c69f900a0e..cbc6147cb81e 100644 --- a/mlir/include/mlir/Dialect/Arith/Transforms/Passes.h +++ b/mlir/include/mlir/Dialect/Arith/Transforms/Passes.h @@ -63,13 +63,6 @@ void populateExpandBFloat16Patterns(RewritePatternSet &patterns); /// Add patterns to expand Arith ops. void populateArithExpandOpsPatterns(RewritePatternSet &patterns); -/// Create a pass to legalize Arith ops. -std::unique_ptr createArithExpandOpsPass(); - -/// Create a pass to legalize Arith ops with specified configuration. -std::unique_ptr -createArithExpandOpsPass(const ArithExpandOpsOptions &options); - /// Create a pass to replace signed ops with unsigned ones where they are proven /// equivalent. std::unique_ptr createArithUnsignedWhenEquivalentPass(); diff --git a/mlir/include/mlir/Dialect/Arith/Transforms/Passes.td b/mlir/include/mlir/Dialect/Arith/Transforms/Passes.td index 5e50adc1cc1f..4096e309199e 100644 --- a/mlir/include/mlir/Dialect/Arith/Transforms/Passes.td +++ b/mlir/include/mlir/Dialect/Arith/Transforms/Passes.td @@ -27,9 +27,8 @@ def ArithBufferizePass : Pass<"arith-bufferize", "ModuleOp"> { ]; } -def ArithExpandOps : Pass<"arith-expand"> { +def ArithExpandOpsPass : Pass<"arith-expand"> { let summary = "Legalize Arith ops to be convertible to LLVM."; - let constructor = "mlir::arith::createArithExpandOpsPass()"; let dependentDialects = ["vector::VectorDialect"]; let options = [ Option<"includeBf16", "include-bf16", "bool", /*default=*/"false", diff --git a/mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp b/mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp index b8630da2ea83..42a63316b31c 100644 --- a/mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp +++ b/mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp @@ -16,7 +16,7 @@ namespace mlir { namespace arith { -#define GEN_PASS_DEF_ARITHEXPANDOPS +#define GEN_PASS_DEF_ARITHEXPANDOPSPASS #include "mlir/Dialect/Arith/Transforms/Passes.h.inc" } // namespace arith } // namespace mlir @@ -303,11 +303,8 @@ struct BFloat16TruncFOpConverter : public OpRewritePattern { }; struct ArithExpandOpsPass - : public arith::impl::ArithExpandOpsBase { - ArithExpandOpsPass() = default; - ArithExpandOpsPass(const arith::ArithExpandOpsOptions& options) { - this->includeBf16 = options.includeBf16; - } + : public arith::impl::ArithExpandOpsPassBase { + using ArithExpandOpsPassBase::ArithExpandOpsPassBase; void runOnOperation() override { RewritePatternSet patterns(&getContext()); @@ -372,12 +369,3 @@ void mlir::arith::populateArithExpandOpsPatterns(RewritePatternSet &patterns) { >(patterns.getContext()); // clang-format on } - -std::unique_ptr mlir::arith::createArithExpandOpsPass() { - return std::make_unique(); -} - -std::unique_ptr mlir::arith::createArithExpandOpsPass( - const ArithExpandOpsOptions& options) { - return std::make_unique(options); -}