[llvm-branch-commits] [llvm] [Dexter] Enable after_hit_count for state nodes (PR #203846)

Orlando Cazalet-Hyams via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jun 30 04:15:45 PDT 2026


================
@@ -44,11 +48,14 @@ def add_hit_if_where_hit_is_new(self, where: Where, step: StepIR) -> bool:
         """Checks whether the current step can be counted as a new "hit" for `where`. Increments `where`'s hit count if
         it has a new hit, and returns True iff so."""
         assert (
-            where.for_hit_count is not None
-        ), "Tried to add hit count for !where without for_hit_count?"
+            where.for_hit_count is not None or where.after_hit_count is not None
+        ), "Tried to add hit count for !where without for/after_hit_count?"
         if self.where_hit_is_new(where, step):
             self.where_hit_counts[where] += 1
-            if self.where_hit_counts[where] >= where.for_hit_count:
+            print(f"Added hit count for {where}")
+            if where.for_hit_count is not None and self.where_hit_counts[
+                where
+            ] >= where.for_hit_count + (where.after_hit_count or 0):
----------------
OCHyams wrote:

black did this? seems like odd formatting to me!

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


More information about the llvm-branch-commits mailing list