(refactor): preserve partial struct construct info during merge with FieldVar placeholders#9804
Conversation
380eff7 to
4f7c2c8
Compare
920fe25 to
d657de1
Compare
PR SummaryMedium Risk Overview This introduces Reviewed by Cursor Bugbot for commit fae55f3. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4f7c2c867c
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
d657de1 to
2ee2269
Compare
4f7c2c8 to
e2dfd8a
Compare
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed all commit messages and made 1 comment.
Reviewable status: 0 of 1 files reviewed, 2 unresolved discussions (waiting on eytan-starkware and TomerStarkware).
a discussion (no related file):
no tests are possible?
2ee2269 to
cb089a7
Compare
e2dfd8a to
e9939df
Compare
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware made 2 comments.
Reviewable status: 0 of 2 files reviewed, 2 unresolved discussions (waiting on orizi and TomerStarkware).
a discussion (no related file):
Previously, orizi wrote…
no tests are possible?
They were lost but now found
eytan-starkware
left a comment
There was a problem hiding this comment.
@eytan-starkware resolved 1 discussion.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on orizi and TomerStarkware).
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e9939df. Configure here.
TomerStarkware
left a comment
There was a problem hiding this comment.
@TomerStarkware reviewed 2 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on eytan-starkware and orizi).
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed all commit messages, made 1 comment, and resolved 1 discussion.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on eytan-starkware).
…FieldVar placeholders
e9939df to
fae55f3
Compare
orizi
left a comment
There was a problem hiding this comment.
@orizi reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on eytan-starkware).


Summary
Introduces placeholder support in equality analysis for struct fields to handle unknown fields during control flow merges. When merging equality states from different branches, fields that don't have intersection representatives are now represented as placeholders instead of being dropped, preserving partial struct information.
Type of change
Please check one:
Why is this change needed?
Previously, when merging equality states from different control flow branches, struct fields that couldn't be unified (no intersection representative) were completely lost. This caused the analysis to lose valuable structural information about partially-known structs, reducing the effectiveness of equality tracking across complex control flows.
What was the behavior or documentation before?
Struct fields in equality analysis were represented only as real variables (
VariableId). During merge operations, if a field had no intersection representative between two branches, that field information was discarded entirely, potentially losing the entire struct relationship.What is the behavior or documentation after?
Struct fields are now represented as
FieldVarenum that can be either a real variable or a globally unique placeholder. During merges, unknown fields become placeholders, preserving the struct's shape and allowing partial equality information to be maintained. Placeholders are displayed as "?" in debug output and are handled appropriately in all struct operations.Related issue or discussion (if any)
Additional context
This change includes comprehensive updates to handle placeholders throughout the equality analysis pipeline, including struct construction/destruction, array operations, and debug formatting. The implementation ensures that placeholders are properly tracked and don't interfere with real variable relationships while preserving as much structural information as possible.