diff --git a/mlir/lib/Transforms/Utils/DialectConversion.cpp b/mlir/lib/Transforms/Utils/DialectConversion.cpp index 5b2cfd370900a..42fe5b925654a 100644 --- a/mlir/lib/Transforms/Utils/DialectConversion.cpp +++ b/mlir/lib/Transforms/Utils/DialectConversion.cpp @@ -101,11 +101,6 @@ struct ConversionValueMapping { mapping.map(oldVal, newVal); } - /// Try to map a value to the one provided. Returns false if a transitive - /// mapping from the new value to the old value already exists, true if the - /// map was updated. - bool tryMap(Value oldVal, Value newVal); - /// Drop the last mapping for the given value. void erase(Value value) { mapping.erase(value); } @@ -149,14 +144,6 @@ Value ConversionValueMapping::lookupOrNull(Value from, Type desiredType) const { return result; } -bool ConversionValueMapping::tryMap(Value oldVal, Value newVal) { - for (Value it = newVal; it; it = mapping.lookupOrNull(it)) - if (it == oldVal) - return false; - map(oldVal, newVal); - return true; -} - //===----------------------------------------------------------------------===// // Rewriter and Translation State //===----------------------------------------------------------------------===//