Skip to content

Commit c26bd82

Browse files
[mlir][Transforms] Remove 1:N dialect conversion driver
1 parent 8e9b48a commit c26bd82

File tree

24 files changed

+4
-1806
lines changed

24 files changed

+4
-1806
lines changed

mlir/include/mlir/Dialect/Func/Transforms/OneToNFuncConversions.h

Lines changed: 0 additions & 26 deletions
This file was deleted.

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,6 @@ void populateSCFStructuralTypeConversions(const TypeConverter &typeConverter,
6363
void populateSCFStructuralTypeConversionTarget(
6464
const TypeConverter &typeConverter, ConversionTarget &target);
6565

66-
/// Populates the provided pattern set with patterns that do 1:N type
67-
/// conversions on (some) SCF ops. This is intended to be used with
68-
/// 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")
73-
void populateSCFStructuralOneToNTypeConversions(
74-
const TypeConverter &typeConverter, RewritePatternSet &patterns);
75-
7666
/// Populate patterns for SCF software pipelining transformation. See the
7767
/// ForLoopPipeliningPattern for the transformation details.
7868
void populateSCFLoopPipeliningPatterns(RewritePatternSet &patterns,

mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h"
2121
#include "mlir/Transforms/DialectConversion.h"
2222
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
23-
#include "mlir/Transforms/OneToNTypeConversion.h"
2423
#include "llvm/ADT/SmallSet.h"
2524
#include "llvm/Support/LogicalResult.h"
2625

mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include "mlir/IR/PatternMatch.h"
1717
#include "mlir/Pass/Pass.h"
1818
#include "mlir/Transforms/DialectConversion.h"
19-
#include "mlir/Transforms/OneToNTypeConversion.h"
2019

2120
//===----------------------------------------------------------------------===//
2221
// Include the generated pass header (which needs some early definitions).

mlir/include/mlir/Transforms/DialectConversion.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,11 @@ class TypeConverter {
4545
// Copy the registered conversions, but not the caches
4646
TypeConverter(const TypeConverter &other)
4747
: conversions(other.conversions),
48-
argumentMaterializations(other.argumentMaterializations),
4948
sourceMaterializations(other.sourceMaterializations),
5049
targetMaterializations(other.targetMaterializations),
5150
typeAttributeConversions(other.typeAttributeConversions) {}
5251
TypeConverter &operator=(const TypeConverter &other) {
5352
conversions = other.conversions;
54-
argumentMaterializations = other.argumentMaterializations;
5553
sourceMaterializations = other.sourceMaterializations;
5654
targetMaterializations = other.targetMaterializations;
5755
typeAttributeConversions = other.typeAttributeConversions;
@@ -177,21 +175,6 @@ class TypeConverter {
177175
/// can be a TypeRange; in that case, the function must return a
178176
/// SmallVector<Value>.
179177

180-
/// This method registers a materialization that will be called when
181-
/// converting (potentially multiple) block arguments that were the result of
182-
/// a signature conversion of a single block argument, to a single SSA value
183-
/// with the old block argument type.
184-
///
185-
/// Note: Argument materializations are used only with the 1:N dialect
186-
/// conversion driver. The 1:N dialect conversion driver will be removed soon
187-
/// and so will be argument materializations.
188-
template <typename FnT, typename T = typename llvm::function_traits<
189-
std::decay_t<FnT>>::template arg_t<1>>
190-
void addArgumentMaterialization(FnT &&callback) {
191-
argumentMaterializations.emplace_back(
192-
wrapMaterialization<T>(std::forward<FnT>(callback)));
193-
}
194-
195178
/// This method registers a materialization that will be called when
196179
/// converting a replacement value back to its original source type.
197180
/// This is used when some uses of the original value persist beyond the main
@@ -319,8 +302,6 @@ class TypeConverter {
319302
/// generating a cast sequence of some kind. See the respective
320303
/// `add*Materialization` for more information on the context for these
321304
/// methods.
322-
Value materializeArgumentConversion(OpBuilder &builder, Location loc,
323-
Type resultType, ValueRange inputs) const;
324305
Value materializeSourceConversion(OpBuilder &builder, Location loc,
325306
Type resultType, ValueRange inputs) const;
326307
Value materializeTargetConversion(OpBuilder &builder, Location loc,
@@ -507,7 +488,6 @@ class TypeConverter {
507488
SmallVector<ConversionCallbackFn, 4> conversions;
508489

509490
/// The list of registered materialization functions.
510-
SmallVector<MaterializationCallbackFn, 2> argumentMaterializations;
511491
SmallVector<MaterializationCallbackFn, 2> sourceMaterializations;
512492
SmallVector<TargetMaterializationCallbackFn, 2> targetMaterializations;
513493

0 commit comments

Comments
 (0)