Repository navigation
feat(sv)!: retain static function locals and results between calls - #1737
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
490485b to
0771ed2
Compare
Revision history
|
0771ed2 to
b4ad699
Compare
b4ad699 to
5b5b5a7
Compare
Merge Queue Status
This pull request spent 1 hour 8 minutes 56 seconds in the queue, with no time running CI. ReasonThe pull request conflicts with the base branch The pull request was held in the queue, conflicting with at least one of 3 pull requests ahead of it. The conflict became a base branch one after #1689 merged. HintYou should update or rebase your pull request. If you want to requeue this pull request, you can post a Requeued — the merge queue status continues in this comment ↓. |
Static function locals, implicit results and output-only arguments now retain observable state between calls, including real values and integral arrays. Call sites share the storage, module instances have separate storage, and constant function evaluation uses fresh initialized values without changing runtime state. One-time initializers run through the existing initialization processes; stateful initializer calls require Simulation or a native testbench. Promote retained storage to ordinary module/package state and lower stateful calls through the imperative path, preserving the existing optimizer and checkpoint behavior. Keep the scratch-local proofs and existing restrictions on task locals, nonconstant static initializers and package writers. Class methods retain automatic lifetime; explicit and implicit constructors preserve their object handles and constructor return behavior. Add shared regressions for call ordering, early returns, real values, arrays, four-state and 981-bit storage, package and instance scopes, constant calls, and timed processes. Retain focused Verilator/Icarus disagreements and compile limitations with standalone sources and narrow tool/case exclusions. Validation after rebasing onto master (ce31782): - Full SystemVerilog backend suite: 4,001 passed, 20 existing ignored. - Analyzer/frontend unit tests: 795 passed, 3 existing ignored. - Lifetime/package consumers: 71 passed. - Shared suite with Verilator/Icarus features: 78 passed. - Focused Verilator: 10 passed, 2 reviewed exclusions, 1 four-state unsupported. - Focused Icarus: 9 passed, 4 reviewed exclusions. - cargo fmt and affected-crate/consumer Clippy checks passed. - Full pinned sv-tests conformance: all 2,054 case/mode verdicts match the reviewed expectations (525 passes in 2state and 527 in 4state). An independently reproduced existing Wasm bug affects unaligned multiword unpacked-array elements; the shared retained-array regression uses 64-bit elements, and the separate 981-bit packed-storage regression passes all backends. BREAKING CHANGE: SubroutineBase gains a persistent_locals field; consumers constructing this public analyzer IR structure must initialize the field. Change-Id: Ib759645220e169de2d702db4a81aa7bb4980944d
5b5b5a7 to
bee6666
Compare
Merge Queue Status
This pull request spent 1 hour 42 minutes 28 seconds in the queue, including 1 hour 10 minutes 18 seconds running CI. Required conditions to merge
|
Static function locals, implicit results and output-only arguments now retain
observable state between calls, including real values and integral arrays.
Call sites share the storage, module instances have separate storage, and
constant function evaluation uses fresh initialized values without changing
runtime state. One-time initializers run through the existing initialization
processes; stateful initializer calls require Simulation or a native testbench.
Promote retained storage to ordinary module/package state and lower stateful
calls through the imperative path, preserving the existing optimizer and
checkpoint behavior. Keep the scratch-local proofs and existing restrictions
on task locals, nonconstant static initializers and package writers. Class
methods retain automatic lifetime; explicit and implicit constructors preserve
their object handles and constructor return behavior.
Add shared regressions for call ordering, early returns, real values, arrays,
four-state and 981-bit storage, package and instance scopes, constant calls,
and timed processes. Retain focused Verilator/Icarus disagreements and compile
limitations with standalone sources and narrow tool/case exclusions.
Validation after rebasing onto master (ce31782):
reviewed expectations (525 passes in 2state and 527 in 4state).
An independently reproduced existing Wasm bug affects unaligned multiword
unpacked-array elements; the shared retained-array regression uses 64-bit
elements, and the separate 981-bit packed-storage regression passes all backends.
BREAKING CHANGE: SubroutineBase gains a persistent_locals field; consumers
constructing this public analyzer IR structure must initialize the field.