Repository navigation
fix(sv): check native module indices and visit Veryl bodies once - #1500
Merged
Conversation
Follow up on review of #1488. parse_ir_with_external_hierarchy_and_native_modules indexed the IR directly with each caller-supplied component index, so a stale or out-of-range index panicked. An index that does not name a module is now reported as an external hierarchy error. Collecting the SV instances below each exported Veryl module walked the whole native subtree again for every exported root, which is quadratic for a chain of modules. The SV descendants of each analyzed body are now computed once and shared. They are keyed by body rather than by signature: instances with equal signatures can carry different aliases for their SV children. Validation: - cargo test -p celox -p celox-frontend-veryl --features celox/systemverilog --lib --test systemverilog - cargo clippy -p celox -p celox-frontend-veryl --all-targets --features celox/systemverilog --no-deps - cargo fmt --all -- --check - New tests: an out-of-range native index is an error, and two instances of one Veryl body keep their separately aliased SV leaves Change-Id: Ie4a691acb3bff0ca8d827ceaf1f6015bc4ccd0d4
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. |
Contributor
Author
|
@Mergifyio queue |
Contributor
Merge Queue Status
This pull request spent 33 minutes 51 seconds in the queue, including 31 minutes 30 seconds running CI. Required conditions to merge
|
39 of 71 tasks
mergify
Bot
deleted the
stack/tignear/fix/mixed-native-index-checks/check-native-module-indices-visit-veryl-bodies--e4a691ac
branch
October 18, 2026 12:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow up on review of #1488.
parse_ir_with_external_hierarchy_and_native_modules indexed the IR directly
with each caller-supplied component index, so a stale or out-of-range index
panicked. An index that does not name a module is now reported as an
external hierarchy error.
Collecting the SV instances below each exported Veryl module walked the whole
native subtree again for every exported root, which is quadratic for a chain
of modules. The SV descendants of each analyzed body are now computed once
and shared. They are keyed by body rather than by signature: instances with
equal signatures can carry different aliases for their SV children.
Validation:
one Veryl body keep their separately aliased SV leaves