[Mlir-commits] [mlir] [MLIR] Prevent invalid IR from being passed outside of RemoveDeadValues (PR #121079)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Dec 30 14:23:12 PST 2024
================
@@ -616,24 +714,28 @@ struct RemoveDeadValues : public impl::RemoveDeadValuesBase<RemoveDeadValues> {
void RemoveDeadValues::runOnOperation() {
auto &la = getAnalysis<RunLivenessAnalysis>();
Operation *module = getOperation();
+ DenseSet<Value> deletionSet;
+ CleanupList cl;
----------------
banach-space wrote:
These two structures play a crucial role and would benefit from more descriptive names and accompanying comments. Here's a suggestion for clarity:
```suggestion
// Tracks values eligible for erasure - complements liveness analysis to identify "droppable" values.
DenseSet<Value> valsToErase;
// Maintains a list of Ops, values, branches, etc., slated for cleanup at the end of this pass.
CleanupList finalCleanUpList;
```
I'll revisit this and provide additional suggestions once I have a deeper understanding of the changes. Also, please correct me if I misinterpreted this.
https://github.com/llvm/llvm-project/pull/121079
More information about the Mlir-commits
mailing list