================
@@ -141,6 +141,33 @@ static bool hasLive(ValueRange values, const 
DenseSet<Value> &nonLiveSet,
   return false;
 }
 
+/// Return true iff at least one value in `values` is dead, given the liveness
+/// information in `la`.
+static bool hasDead(ValueRange values, const DenseSet<Value> &nonLiveSet,
+                    RunLivenessAnalysis &la) {
+  for (Value value : values) {
+    if (nonLiveSet.contains(value)) {
+      LDBG() << "Value " << value << " is already marked non-live (dead)";
+      return true;
+    }
+
+    const Liveness *liveness = la.getLiveness(value);
+    if (!liveness) {
----------------
matthias-springer wrote:

I removed the `hasDead` function (to keep the PR smaller) and instead rely on 
`markLives(values, nonLiveSet, la).flip().any()`, like in other places in this 
file.

https://github.com/llvm/llvm-project/pull/169269
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to