Skip to content

[mlir][Transforms] Mark 1:N conversion driver as deprecated #121102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
16 changes: 16 additions & 0 deletions mlir/include/mlir/Transforms/OneToNTypeConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
Loading