[Mlir-commits] [mlir] 72f5050 - [mlir][NFC] Remove unused deprecated API wrappers (#182715)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Feb 23 04:36:44 PST 2026


Author: Vladimir Miloserdov
Date: 2026-02-23T14:36:39+02:00
New Revision: 72f5050ae7656a23e9c5f23f6fdb524a0b0bd2d9

URL: https://github.com/llvm/llvm-project/commit/72f5050ae7656a23e9c5f23f6fdb524a0b0bd2d9
DIFF: https://github.com/llvm/llvm-project/commit/72f5050ae7656a23e9c5f23f6fdb524a0b0bd2d9.diff

LOG: [mlir][NFC] Remove unused deprecated API wrappers (#182715)

Remove deprecated functions and constructors that have zero callers in
the monorepo: `applyPatternsAndFoldGreedily`, `applyOpPatternsAndFold`,
`NamedAttrList(std::nullopt_t)`, and `OpPrintingFlags(std::nullopt_t)`.

These had FIXME comments requesting their removal.

Added: 
    

Modified: 
    mlir/include/mlir/IR/OperationSupport.h
    mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/IR/OperationSupport.h b/mlir/include/mlir/IR/OperationSupport.h
index 1ff7c56ddca38..79b929ff85e55 100644
--- a/mlir/include/mlir/IR/OperationSupport.h
+++ b/mlir/include/mlir/IR/OperationSupport.h
@@ -802,8 +802,6 @@ class NamedAttrList {
   using size_type = size_t;
 
   NamedAttrList() : dictionarySorted({}, true) {}
-  LLVM_DEPRECATED("Use NamedAttrList() instead", "NamedAttrList()")
-  NamedAttrList(std::nullopt_t none) : NamedAttrList() {}
   NamedAttrList(ArrayRef<NamedAttribute> attributes);
   NamedAttrList(DictionaryAttr attributes);
   NamedAttrList(const_iterator inStart, const_iterator inEnd);
@@ -1176,8 +1174,6 @@ class alignas(8) OperandStorage {
 class OpPrintingFlags {
 public:
   OpPrintingFlags();
-  LLVM_DEPRECATED("Use OpPrintingFlags() instead", "OpPrintingFlags()")
-  OpPrintingFlags(std::nullopt_t) : OpPrintingFlags() {}
 
   /// Enables the elision of large elements attributes by printing a lexically
   /// valid but otherwise meaningless form instead of the element data. The

diff  --git a/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h b/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
index 45e61b68f5db2..d56d7e58c35f9 100644
--- a/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
+++ b/mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
@@ -177,18 +177,6 @@ LogicalResult
 applyPatternsGreedily(Region &region, const FrozenRewritePatternSet &patterns,
                       GreedyRewriteConfig config = GreedyRewriteConfig(),
                       bool *changed = nullptr);
-/// Same as `applyPatternsAndGreedily` above with folding.
-/// FIXME: Remove this once transition to above is completed.
-LLVM_DEPRECATED("Use applyPatternsGreedily() instead", "applyPatternsGreedily")
-inline LogicalResult
-applyPatternsAndFoldGreedily(Region &region,
-                             const FrozenRewritePatternSet &patterns,
-                             GreedyRewriteConfig config = GreedyRewriteConfig(),
-                             bool *changed = nullptr) {
-  config.enableFolding();
-  return applyPatternsGreedily(region, patterns, config, changed);
-}
-
 /// Rewrite ops nested under the given operation, which must be isolated from
 /// above, by repeatedly applying the highest benefit patterns in a greedy
 /// worklist driven manner until a fixpoint is reached.
@@ -229,18 +217,6 @@ applyPatternsGreedily(Operation *op, const FrozenRewritePatternSet &patterns,
     *changed = anyRegionChanged;
   return failure(failed);
 }
-/// Same as `applyPatternsGreedily` above with folding.
-/// FIXME: Remove this once transition to above is complieted.
-LLVM_DEPRECATED("Use applyPatternsGreedily() instead", "applyPatternsGreedily")
-inline LogicalResult
-applyPatternsAndFoldGreedily(Operation *op,
-                             const FrozenRewritePatternSet &patterns,
-                             GreedyRewriteConfig config = GreedyRewriteConfig(),
-                             bool *changed = nullptr) {
-  config.enableFolding();
-  return applyPatternsGreedily(op, patterns, config, changed);
-}
-
 /// Rewrite the specified ops by repeatedly applying the highest benefit
 /// patterns in a greedy worklist driven manner until a fixpoint is reached.
 ///
@@ -274,19 +250,6 @@ applyOpPatternsGreedily(ArrayRef<Operation *> ops,
                         const FrozenRewritePatternSet &patterns,
                         GreedyRewriteConfig config = GreedyRewriteConfig(),
                         bool *changed = nullptr, bool *allErased = nullptr);
-/// Same as `applyOpPatternsGreedily` with folding.
-/// FIXME: Remove this once transition to above is complieted.
-LLVM_DEPRECATED("Use applyOpPatternsGreedily() instead",
-                "applyOpPatternsGreedily")
-inline LogicalResult
-applyOpPatternsAndFold(ArrayRef<Operation *> ops,
-                       const FrozenRewritePatternSet &patterns,
-                       GreedyRewriteConfig config = GreedyRewriteConfig(),
-                       bool *changed = nullptr, bool *allErased = nullptr) {
-  config.enableFolding();
-  return applyOpPatternsGreedily(ops, patterns, config, changed, allErased);
-}
-
 } // namespace mlir
 
 #endif // MLIR_TRANSFORMS_GREEDYPATTERNREWRITEDRIVER_H_


        


More information about the Mlir-commits mailing list