[Mlir-commits] [mlir] [MLIR] Prevent invalid IR from being passed outside of RemoveDeadValues (PR #121079)
Renat Idrisov
llvmlistbot at llvm.org
Tue Dec 31 08:16:48 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);
+}
----------------
parsifal-47 wrote:
removed, thank you!
https://github.com/llvm/llvm-project/pull/121079
More information about the Mlir-commits
mailing list