Skip to content

perf(runtime): snapshot only a group's own trigger addresses in the interpreter - #2018

Merged
mergify[bot] merged 1 commit into
masterfrom
perf/interp-group-trigger-addrs
Oct 25, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
perf/interp-group-trigger-addrs

Conversation

@tignear

@tignear tignear commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Closes #2015. Stacked on #2009, because both change the same InterpBackend trigger-address code. It will be retargeted to master once #2009 merges.

Summary

The interpreter used to snapshot one shared list of trigger addresses for every group of a clock: eval/apply, eval-only and apply. For an eval/apply clock, that list included every combinational trigger address, so with emit_triggers each apply_ff_at and eval_only_ff_at read O(combinational trigger addresses) words. On C906 that is most of the interpreter's time.

Each group now carries its own list (UnitGroup, holding the prepared units and the trigger-bearing addresses they store):

  • The eval/apply, eval-only and apply groups snapshot only their own FF units' addresses.
  • The combined comb+FF tick without a fused schedule snapshots the combinational list merged with the clock's eval/apply list (TriggerAddrs, no copy).
  • A fused tick snapshots the trigger addresses its fused units store, restricted to those the old list contained, so it marks exactly what it marked before.

This does not change behavior. A snapshot is read only by a trigger store that runs in the group, and a store whose address has no snapshot marks nothing. An address that no unit of a group stores was snapshotted and never read. ClockTriggerAddrs and clock_trigger_addrs are removed.

Tests

  • split_groups_snapshot_only_their_own_trigger_addresses (systemverilog): a testbench with a combinationally gated clock. Its processes make it use the split eval-only/apply groups. The test checks that the apply and eval-only groups hold no combinational trigger address. It then runs the design on the interpreter and on Cranelift and compares q, g and seen (an always @(posedge gclk) counter, so the gated clock's trigger must fire) at 67 time points.
  • The existing tests from perf(runtime): share the interpreter's combinational program across clocks #2009 (combined ticks of three clocks against Cranelift, trigger-list merge).
  • cargo nextest run -p celox --features systemverilog under the memory cap: 14636 passed, 0 failed, 313 skipped.

This changes only the interpreter backend, so the native code that the b2 callgrind gate measures is unchanged, and I didn't run that gate.

Depends-On: #2009

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T14:56:57.318041Z 8502b27 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 25, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 25, 2026
@mergify

mergify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-25 13:33 UTC · Rule: changes · triggered by rule Queue explicitly requested merges
  • 🚫 Left the queue — 2026-10-25 14:00 UTC · at 825400cb97cb849f1930d70aefee0a9a509b3424

This pull request spent 27 minutes 27 seconds in the queue, with no time running CI.

Reason

Pull request #2018 has been dequeued

Queue conditions are not satisfied:

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Requeued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added dequeued Mergify stopped this queue entry; investigate before retrying and removed queued Mergify queue entry labels Oct 25, 2026
@tignear
tignear force-pushed the perf/2004-interp-shared-comb branch from 1ea32b4 to dfc09d0 Compare October 25, 2026 14:12
…nterpreter

Closes #2015

Change-Id: I20ab707920a989f6babea59338a9ab0dd15d0b39
@tignear
tignear force-pushed the perf/interp-group-trigger-addrs branch from 825400c to 8502b27 Compare October 25, 2026 14:55
@tignear tignear removed the dequeued Mergify stopped this queue entry; investigate before retrying label Oct 25, 2026
@mergify mergify Bot added the queued Mergify queue entry label Oct 25, 2026
@mergify

mergify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 35 minutes 47 seconds in the queue, including 33 minutes 5 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • depends-on = celox-sim/celox#2009 [⛓️ perf(runtime): share the interpreter's combinational program across clocks #2009]
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

Base automatically changed from perf/2004-interp-shared-comb to master October 25, 2026 15:24
@mergify
mergify Bot merged commit 1ad1cd9 into master Oct 25, 2026
24 checks passed
@mergify
mergify Bot deleted the perf/interp-group-trigger-addrs branch October 25, 2026 15:58
@mergify mergify Bot removed the queued Mergify queue entry label Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(runtime): interpreter apply and eval-only groups snapshot every combinational trigger address

1 participant