[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:44 PDT 2026
================
@@ -99,11 +117,13 @@ def match_where_to_frame(
step: StepIR,
labels: Dict[str, int],
context: StateMatchContext,
-) -> bool:
+) -> WhereFrameMatchResult:
"""Returns True if `where` matches `frame`. As part of this check, we perform the check once, and if necessary we
may increment `where`'s hit count and check again."""
result = _match_where_to_frame(where, frame, labels, context)
- if result == True and where.for_hit_count is not None:
+ if result == WhereFrameMatchResult.EARLY or (
+ result == WhereFrameMatchResult.TRUE and where.for_hit_count is not None
+ ):
if context.add_hit_if_where_hit_is_new(where, step):
result = _match_where_to_frame(where, frame, labels, context)
----------------
OCHyams wrote:
I know it's not part of the patch but why do we need to call this twice? The docstring doesn't elaborate much
https://github.com/llvm/llvm-project/pull/203846
More information about the llvm-branch-commits
mailing list