Skip to content

Commit 80ecbaa

Browse files
[mlir][Transforms] Mark 1:N conversion driver as deprecated (#121102)
The 1:N conversion driver will be removed soon. Note for LLVM integration: Please migrate your code base to the regular dialect conversion driver.
1 parent 31613de commit 80ecbaa

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ void populateSCFStructuralTypeConversionTarget(
6666
/// Populates the provided pattern set with patterns that do 1:N type
6767
/// conversions on (some) SCF ops. This is intended to be used with
6868
/// applyPartialOneToNConversion.
69+
/// FIXME: The 1:N dialect conversion is deprecated and will be removed soon.
70+
/// 1:N support has been added to the regular dialect conversion driver.
71+
LLVM_DEPRECATED("Use populateSCFStructuralTypeConversions() instead",
72+
"populateSCFStructuralTypeConversions")
6973
void populateSCFStructuralOneToNTypeConversions(
7074
const TypeConverter &typeConverter, RewritePatternSet &patterns);
7175

mlir/include/mlir/Transforms/OneToNTypeConversion.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
//
77
//===----------------------------------------------------------------------===//
88
//
9+
// Note: The 1:N dialect conversion is deprecated and will be removed soon.
10+
// 1:N support has been added to the regular dialect conversion driver.
11+
//
912
// This file provides utils for implementing (poor-man's) dialect conversion
1013
// passes with 1:N type conversions.
1114
//
@@ -119,6 +122,10 @@ class OneToNPatternRewriter : public PatternRewriter {
119122
/// types must be the same as the result types of the op) and the new values
120123
/// (i.e., the converted types must be the same as the types of the new
121124
/// values).
125+
/// FIXME: The 1:N dialect conversion is deprecated and will be removed soon.
126+
/// 1:N support has been added to the regular dialect conversion driver.
127+
LLVM_DEPRECATED("Use replaceOpWithMultiple() instead",
128+
"replaceOpWithMultiple")
122129
void replaceOp(Operation *op, ValueRange newValues,
123130
const OneToNTypeMapping &resultMapping);
124131
using PatternRewriter::replaceOp;
@@ -251,6 +258,10 @@ class OneToNOpConversionPattern : public OneToNConversionPattern {
251258
/// or illegal types; the function simply applies the given patterns and does
252259
/// not fail if some ops or types remain unconverted (i.e., the conversion is
253260
/// only "partial").
261+
/// FIXME: The 1:N dialect conversion is deprecated and will be removed soon.
262+
/// 1:N support has been added to the regular dialect conversion driver.
263+
LLVM_DEPRECATED("Use applyPartialConversion() instead",
264+
"applyPartialConversion")
254265
LogicalResult
255266
applyPartialOneToNConversion(Operation *op, TypeConverter &typeConverter,
256267
const FrozenRewritePatternSet &patterns);
@@ -259,6 +270,11 @@ applyPartialOneToNConversion(Operation *op, TypeConverter &typeConverter,
259270
/// FunctionOpInterface op with the given type converter. This only supports
260271
/// ops which use FunctionType to represent their type. This is intended to be
261272
/// used with the 1:N dialect conversion.
273+
/// FIXME: The 1:N dialect conversion is deprecated and will be removed soon.
274+
/// 1:N support has been added to the regular dialect conversion driver.
275+
LLVM_DEPRECATED(
276+
"Use populateFunctionOpInterfaceTypeConversionPattern() instead",
277+
"populateFunctionOpInterfaceTypeConversionPattern")
262278
void populateOneToNFunctionOpInterfaceTypeConversionPattern(
263279
StringRef functionLikeOpName, const TypeConverter &converter,
264280
RewritePatternSet &patterns);

0 commit comments

Comments
 (0)