Skip to content
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

[FXML-5417] TileUsingInterface: drop unused extract_slice #432

Merged
merged 4 commits into from
Jan 6, 2025
Merged
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions mlir/lib/Dialect/SCF/Transforms/TileUsingInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,12 @@ mlir::scf::tileConsumerAndFuseProducersUsingSCF(
tiledAndFusedOps.insert(tiledAndFusedOp);
}

// Drop the extract_slice if it has been replaced by the tiled producer, and
// is no longer used.
if(worklistItem.candidateSlice->use_empty()) {
rewriter.eraseOp(worklistItem.candidateSlice);
}

if (failed(sliceTracker.insertAndApplyPatterns(worklistCandidates))) {
cferry-AMD marked this conversation as resolved.
Show resolved Hide resolved
return rewriter.notifyMatchFailure(consumer, "cleanup patterns failed");
}
Expand Down
Loading