Skip to content

[mlir][Transforms] Delete 1:N dialect conversion driver #121389

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
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
26 changes: 0 additions & 26 deletions mlir/include/mlir/Dialect/Func/Transforms/OneToNFuncConversions.h

This file was deleted.

9 changes: 0 additions & 9 deletions mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,6 @@ void populateSCFStructuralTypeConversions(const TypeConverter &typeConverter,
void populateSCFStructuralTypeConversionTarget(
const TypeConverter &typeConverter, ConversionTarget &target);

/// 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.
/// Use populateSCFStructuralTypeConversions() instead.
void populateSCFStructuralOneToNTypeConversions(
const TypeConverter &typeConverter, RewritePatternSet &patterns);

/// Populate patterns for SCF software pipelining transformation. See the
/// ForLoopPipeliningPattern for the transformation details.
void populateSCFLoopPipeliningPatterns(RewritePatternSet &patterns,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "mlir/Transforms/OneToNTypeConversion.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/LogicalResult.h"

Expand Down
20 changes: 0 additions & 20 deletions mlir/include/mlir/Transforms/DialectConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ class TypeConverter {
// Copy the registered conversions, but not the caches
TypeConverter(const TypeConverter &other)
: conversions(other.conversions),
argumentMaterializations(other.argumentMaterializations),
sourceMaterializations(other.sourceMaterializations),
targetMaterializations(other.targetMaterializations),
typeAttributeConversions(other.typeAttributeConversions) {}
TypeConverter &operator=(const TypeConverter &other) {
conversions = other.conversions;
argumentMaterializations = other.argumentMaterializations;
sourceMaterializations = other.sourceMaterializations;
targetMaterializations = other.targetMaterializations;
typeAttributeConversions = other.typeAttributeConversions;
Expand Down Expand Up @@ -180,21 +178,6 @@ class TypeConverter {
/// can be a TypeRange; in that case, the function must return a
/// SmallVector<Value>.

/// This method registers a materialization that will be called when
/// converting (potentially multiple) block arguments that were the result of
/// a signature conversion of a single block argument, to a single SSA value
/// with the old block argument type.
///
/// Note: Argument materializations are used only with the 1:N dialect
/// conversion driver. The 1:N dialect conversion driver will be removed soon
/// and so will be argument materializations.
template <typename FnT, typename T = typename llvm::function_traits<
std::decay_t<FnT>>::template arg_t<1>>
void addArgumentMaterialization(FnT &&callback) {
argumentMaterializations.emplace_back(
wrapMaterialization<T>(std::forward<FnT>(callback)));
}

/// This method registers a materialization that will be called when
/// converting a replacement value back to its original source type.
/// This is used when some uses of the original value persist beyond the main
Expand Down Expand Up @@ -322,8 +305,6 @@ class TypeConverter {
/// generating a cast sequence of some kind. See the respective
/// `add*Materialization` for more information on the context for these
/// methods.
Value materializeArgumentConversion(OpBuilder &builder, Location loc,
Type resultType, ValueRange inputs) const;
Value materializeSourceConversion(OpBuilder &builder, Location loc,
Type resultType, ValueRange inputs) const;
Value materializeTargetConversion(OpBuilder &builder, Location loc,
Expand Down Expand Up @@ -510,7 +491,6 @@ class TypeConverter {
SmallVector<ConversionCallbackFn, 4> conversions;

/// The list of registered materialization functions.
SmallVector<MaterializationCallbackFn, 2> argumentMaterializations;
SmallVector<MaterializationCallbackFn, 2> sourceMaterializations;
SmallVector<TargetMaterializationCallbackFn, 2> targetMaterializations;

Expand Down
285 changes: 0 additions & 285 deletions mlir/include/mlir/Transforms/OneToNTypeConversion.h

This file was deleted.

1 change: 0 additions & 1 deletion mlir/lib/Dialect/Func/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
add_mlir_dialect_library(MLIRFuncTransforms
DuplicateFunctionElimination.cpp
FuncConversions.cpp
OneToNFuncConversions.cpp

ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Func/Transforms
Expand Down
Loading
Loading