[Mlir-commits] [mlir] [MLIR] Prevent invalid IR from being passed outside of RemoveDeadValues (PR #121079)

Andrzej WarzyƄski llvmlistbot at llvm.org
Thu Jan 2 08:02:26 PST 2025


================
@@ -115,6 +152,18 @@ static BitVector markLives(ValueRange values, RunLivenessAnalysis &la) {
   return lives;
 }
 
+/// Collects values marked as "non-live" in the provided range and inserts them
+/// into the given set. A value is considered "non-live" if the corresponding
+/// index in the `nonLive` bit vector is set.
----------------
banach-space wrote:

1. "into the given set" is unclear (what do you mean by that?)
2. How about "into given set" -> "into `deletionSet"`
3. Given that this comment mentions "non-live", IMHO `deletionSet` should be renamed as `nonLiveVals` (or `deadVals`). Or, `nonLiveSetOfVals` (`nonLiveSet` sounds a bit ambiguous to me).

I see that you have already renamed `deletionSet` in `RemoveDeadValues::runOnOperation()`. Why not do it consistently throughout this patch?

https://github.com/llvm/llvm-project/pull/121079


More information about the Mlir-commits mailing list