diff --git a/src/main/java/com/android/tools/r8/shaking/Enqueuer.java b/src/main/java/com/android/tools/r8/shaking/Enqueuer.java
index 6b70524..0552373 100644
--- a/src/main/java/com/android/tools/r8/shaking/Enqueuer.java
+++ b/src/main/java/com/android/tools/r8/shaking/Enqueuer.java
@@ -4754,7 +4754,7 @@
         long numberOfLiveItemsAfterProcessing = getNumberOfLiveItems();
         if (numberOfLiveItemsAfterProcessing > numberOfLiveItems) {
           timing.time("Conditional rules", () -> applicableRules.evaluateConditionalRules(this));
-          ifRuleEvaluatorFactory.run(subtypingInfo);
+          ifRuleEvaluatorFactory.run(subtypingInfo, timing);
           assert getNumberOfLiveItems() == numberOfLiveItemsAfterProcessing;
           if (!worklist.isEmpty()) {
             continue;
diff --git a/src/main/java/com/android/tools/r8/shaking/IfRuleEvaluator.java b/src/main/java/com/android/tools/r8/shaking/IfRuleEvaluator.java
index cce2733..72563e2 100644
--- a/src/main/java/com/android/tools/r8/shaking/IfRuleEvaluator.java
+++ b/src/main/java/com/android/tools/r8/shaking/IfRuleEvaluator.java
@@ -17,12 +17,12 @@
 import com.android.tools.r8.shaking.RootSetUtils.ConsequentRootSetBuilder;
 import com.android.tools.r8.shaking.RootSetUtils.RootSetBuilder;
 import com.android.tools.r8.threading.TaskCollection;
+import com.android.tools.r8.utils.MapUtils;
 import com.google.common.base.Equivalence.Wrapper;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Sets;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -35,7 +35,6 @@
   private final AppView<? extends AppInfoWithClassHierarchy> appView;
   private final SubtypingInfo subtypingInfo;
   private final Enqueuer enqueuer;
-  private final Map<Wrapper<ProguardIfRule>, Set<ProguardIfRule>> ifRules;
   private final ConsequentRootSetBuilder rootSetBuilder;
   private final TaskCollection<?> tasks;
 
@@ -43,27 +42,22 @@
       AppView<? extends AppInfoWithClassHierarchy> appView,
       SubtypingInfo subtypingInfo,
       Enqueuer enqueuer,
-      Map<Wrapper<ProguardIfRule>, Set<ProguardIfRule>> ifRules,
       ConsequentRootSetBuilder rootSetBuilder,
       TaskCollection<?> tasks) {
     assert tasks.isEmpty();
     this.appView = appView;
     this.subtypingInfo = subtypingInfo;
     this.enqueuer = enqueuer;
-    this.ifRules = ifRules;
     this.rootSetBuilder = rootSetBuilder;
     this.tasks = tasks;
   }
 
-  public void run() throws ExecutionException {
-    appView.appInfo().app().timing.begin("Find consequent items for -if rules...");
-    try {
-        Iterator<Map.Entry<Wrapper<ProguardIfRule>, Set<ProguardIfRule>>> it =
-            ifRules.entrySet().iterator();
-        while (it.hasNext()) {
-          Map.Entry<Wrapper<ProguardIfRule>, Set<ProguardIfRule>> ifRuleEntry = it.next();
-          ProguardIfRule ifRuleKey = ifRuleEntry.getKey().get();
-          Set<ProguardIfRule> ifRulesInEquivalence = ifRuleEntry.getValue();
+  public void run(Map<Wrapper<ProguardIfRule>, Set<ProguardIfRule>> ifRules)
+      throws ExecutionException {
+    MapUtils.removeIf(
+        ifRules,
+        (ifRuleWrapper, ifRulesInEquivalence) -> {
+          ProguardIfRule ifRuleKey = ifRuleWrapper.get();
           List<ProguardIfRule> toRemove = new ArrayList<>();
 
           // Depending on which types that trigger the -if rule, the application of the subsequent
@@ -86,15 +80,12 @@
                 });
           }
           if (ifRulesInEquivalence.size() == toRemove.size()) {
-            it.remove();
-          } else if (!toRemove.isEmpty()) {
-            ifRulesInEquivalence.removeAll(toRemove);
+            return true;
           }
-        }
-        tasks.await();
-    } finally {
-      appView.appInfo().app().timing.end();
-    }
+          toRemove.forEach(ifRulesInEquivalence::remove);
+          return false;
+        });
+    tasks.await();
   }
 
   private void evaluateRuleOnEffectivelyLiveClass(
diff --git a/src/main/java/com/android/tools/r8/shaking/IfRuleEvaluatorFactory.java b/src/main/java/com/android/tools/r8/shaking/IfRuleEvaluatorFactory.java
index b85f182..551a8c6 100644
--- a/src/main/java/com/android/tools/r8/shaking/IfRuleEvaluatorFactory.java
+++ b/src/main/java/com/android/tools/r8/shaking/IfRuleEvaluatorFactory.java
@@ -11,6 +11,7 @@
 import com.android.tools.r8.shaking.RootSetUtils.ConsequentRootSet;
 import com.android.tools.r8.shaking.RootSetUtils.ConsequentRootSetBuilder;
 import com.android.tools.r8.threading.TaskCollection;
+import com.android.tools.r8.utils.Timing;
 import com.google.common.base.Equivalence.Wrapper;
 import java.util.Collections;
 import java.util.HashMap;
@@ -59,15 +60,15 @@
     return activeIfRules;
   }
 
-  public void run(SubtypingInfo subtypingInfo) throws ExecutionException {
+  public void run(SubtypingInfo subtypingInfo, Timing timing) throws ExecutionException {
     if (activeIfRules.isEmpty()) {
       return;
     }
     ConsequentRootSetBuilder consequentRootSetBuilder =
         ConsequentRootSet.builder(appView, enqueuer, subtypingInfo);
-    new IfRuleEvaluator(
-            appView, subtypingInfo, enqueuer, activeIfRules, consequentRootSetBuilder, tasks)
-        .run();
+    IfRuleEvaluator evaluator =
+        new IfRuleEvaluator(appView, subtypingInfo, enqueuer, consequentRootSetBuilder, tasks);
+    timing.time("Find consequent items for -if rules...", () -> evaluator.run(activeIfRules));
     enqueuer.addConsequentRootSet(consequentRootSetBuilder.buildConsequentRootSet());
   }
 }
diff --git a/src/main/java/com/android/tools/r8/utils/MapUtils.java b/src/main/java/com/android/tools/r8/utils/MapUtils.java
index c991a7d..ac5d7f6 100644
--- a/src/main/java/com/android/tools/r8/utils/MapUtils.java
+++ b/src/main/java/com/android/tools/r8/utils/MapUtils.java
@@ -10,11 +10,11 @@
 import it.unimi.dsi.fastutil.ints.Int2ReferenceMaps;
 import java.util.Collections;
 import java.util.IdentityHashMap;
+import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.function.BiConsumer;
 import java.util.function.BiFunction;
-import java.util.function.BiPredicate;
 import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.function.IntFunction;
@@ -80,8 +80,15 @@
     map.entrySet().removeIf(entry -> entry.getKey() == entry.getValue());
   }
 
-  public static <K, V> void removeIf(Map<K, V> map, BiPredicate<K, V> predicate) {
-    map.entrySet().removeIf(entry -> predicate.test(entry.getKey(), entry.getValue()));
+  public static <K, V, E extends Throwable> void removeIf(
+      Map<K, V> map, ThrowingBiPredicate<K, V, E> predicate) throws E {
+    Iterator<Entry<K, V>> iterator = map.entrySet().iterator();
+    while (iterator.hasNext()) {
+      Entry<K, V> entry = iterator.next();
+      if (predicate.test(entry.getKey(), entry.getValue())) {
+        iterator.remove();
+      }
+    }
   }
 
   public static <K, V> V removeOrDefault(Map<K, V> map, K key, V defaultValue) {
diff --git a/src/main/java/com/android/tools/r8/utils/ThrowingBiPredicate.java b/src/main/java/com/android/tools/r8/utils/ThrowingBiPredicate.java
new file mode 100644
index 0000000..7e6fa66
--- /dev/null
+++ b/src/main/java/com/android/tools/r8/utils/ThrowingBiPredicate.java
@@ -0,0 +1,9 @@
+// Copyright (c) 2024, the R8 project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+package com.android.tools.r8.utils;
+
+public interface ThrowingBiPredicate<S, T, E extends Throwable> {
+
+  boolean test(S s, T t) throws E;
+}
