[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:10 PST 2024
================
@@ -115,6 +157,21 @@ static BitVector markLives(ValueRange values, RunLivenessAnalysis &la) {
return lives;
}
+// DeletionSet is used to track the Values that are scheduled for removal
+void updateDeletionSet(DenseSet<Value> &deletionSet, ValueRange range,
+ const BitVector &nonLive) {
+ for (auto [index, result] : llvm::enumerate(range)) {
+ if (!nonLive[index])
+ continue;
+ deletionSet.insert(result);
+ }
+}
+
+void updateDeletionSet(DenseSet<Value> &deletionSet, Operation *op,
+ const BitVector &nonLive) {
+ updateDeletionSet(deletionSet, op->getResults(), nonLive);
+}
----------------
banach-space wrote:
Is this version needed? Feels like noise.
https://github.com/llvm/llvm-project/pull/121079
More information about the Mlir-commits
mailing list