Skip to content

[mlir][Transforms][NFC] Dialect Conversion: Delete dead code from ConversionValueMapping #116758

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
Nov 19, 2024
Merged
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
13 changes: 0 additions & 13 deletions mlir/lib/Transforms/Utils/DialectConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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); }

Expand Down Expand Up @@ -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
//===----------------------------------------------------------------------===//
Expand Down
Loading