[Mlir-commits] [mlir] [mlir][Transforms] Mark 1:N conversion driver as deprecated (PR #121102)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Dec 25 01:48:47 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-core

Author: Matthias Springer (matthias-springer)

<details>
<summary>Changes</summary>

Depends on: #<!-- -->121054, #<!-- -->121101


---
Full diff: https://github.com/llvm/llvm-project/pull/121102.diff


2 Files Affected:

- (modified) mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h (+4) 
- (modified) mlir/include/mlir/Transforms/OneToNTypeConversion.h (+16) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h b/mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h
index b87407d302a823..9c1479d28c305f 100644
--- a/mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h
+++ b/mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h
@@ -66,6 +66,10 @@ void populateSCFStructuralTypeConversionTarget(
 /// Populates the provided pattern set with patterns that do 1:N type
 /// conversions on (some) SCF ops. This is intended to be used with
 /// applyPartialOneToNConversion.
+/// FIXME: The 1:N dialect conversion is deprecated and will be removed soon.
+/// 1:N support has been added to the regular dialect conversion driver.
+LLVM_DEPRECATED("Use populateSCFStructuralTypeConversions() instead",
+                "populateSCFStructuralTypeConversions")
 void populateSCFStructuralOneToNTypeConversions(
     const TypeConverter &typeConverter, RewritePatternSet &patterns);
 
diff --git a/mlir/include/mlir/Transforms/OneToNTypeConversion.h b/mlir/include/mlir/Transforms/OneToNTypeConversion.h
index 7b4dd65cbff7b2..9c74bf916d971b 100644
--- a/mlir/include/mlir/Transforms/OneToNTypeConversion.h
+++ b/mlir/include/mlir/Transforms/OneToNTypeConversion.h
@@ -6,6 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 //
+// Note: The 1:N dialect conversion is deprecated and will be removed soon.
+// 1:N support has been added to the regular dialect conversion driver.
+//
 // This file provides utils for implementing (poor-man's) dialect conversion
 // passes with 1:N type conversions.
 //
@@ -119,6 +122,10 @@ class OneToNPatternRewriter : public PatternRewriter {
   /// types must be the same as the result types of the op) and the new values
   /// (i.e., the converted types must be the same as the types of the new
   /// values).
+  /// FIXME: The 1:N dialect conversion is deprecated and will be removed soon.
+  /// 1:N support has been added to the regular dialect conversion driver.
+  LLVM_DEPRECATED("Use replaceOpWithMultiple() instead",
+                  "replaceOpWithMultiple")
   void replaceOp(Operation *op, ValueRange newValues,
                  const OneToNTypeMapping &resultMapping);
   using PatternRewriter::replaceOp;
@@ -251,6 +258,10 @@ class OneToNOpConversionPattern : public OneToNConversionPattern {
 /// or illegal types; the function simply applies the given patterns and does
 /// not fail if some ops or types remain unconverted (i.e., the conversion is
 /// only "partial").
+/// FIXME: The 1:N dialect conversion is deprecated and will be removed soon.
+/// 1:N support has been added to the regular dialect conversion driver.
+LLVM_DEPRECATED("Use applyPartialConversion() instead",
+                "applyPartialConversion")
 LogicalResult
 applyPartialOneToNConversion(Operation *op, TypeConverter &typeConverter,
                              const FrozenRewritePatternSet &patterns);
@@ -259,6 +270,11 @@ applyPartialOneToNConversion(Operation *op, TypeConverter &typeConverter,
 /// FunctionOpInterface op with the given type converter. This only supports
 /// ops which use FunctionType to represent their type. This is intended to be
 /// used with the 1:N dialect conversion.
+/// FIXME: The 1:N dialect conversion is deprecated and will be removed soon.
+/// 1:N support has been added to the regular dialect conversion driver.
+LLVM_DEPRECATED(
+    "Use populateFunctionOpInterfaceTypeConversionPattern() instead",
+    "populateFunctionOpInterfaceTypeConversionPattern")
 void populateOneToNFunctionOpInterfaceTypeConversionPattern(
     StringRef functionLikeOpName, const TypeConverter &converter,
     RewritePatternSet &patterns);

``````````

</details>


https://github.com/llvm/llvm-project/pull/121102


More information about the Mlir-commits mailing list