Skip to content

Fix tbaa usage when storing into heap allocated immutable structs #58483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025

Conversation

gbaraldi
Copy link
Member

@gbaraldi gbaraldi commented May 21, 2025

Fixes #58470. In #54604 this was half fixed but at that point I was already skeptical of the union selector being part of stack, where it's actually part of a value. This creates a immutunionselbyte tbaa and a mut version.

@gbaraldi gbaraldi requested a review from vtjnash May 21, 2025 14:56
@gbaraldi
Copy link
Member Author

@nanosoldier runbenchmarks(ALL, vs=":master")

@gbaraldi gbaraldi changed the title Refactor TBAA hierarchy creating both immutable and mutable union selectors Fix tbaa usage when storing into heap allocated immutable structs May 21, 2025
@gbaraldi gbaraldi added backport 1.11 Change should be backported to release-1.11 backport 1.12 Change should be backported to release-1.12 labels May 21, 2025
Copy link
Member

@topolarity topolarity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! This looks more consistent with the hierarchy now 👍

@topolarity topolarity added the merge me PR is reviewed. Merge when all tests are passing label May 21, 2025
@IanButterworth IanButterworth merged commit e3982cd into master May 22, 2025
11 checks passed
@IanButterworth IanButterworth deleted the gb/tbaafun branch May 22, 2025 02:47
@topolarity topolarity removed the merge me PR is reviewed. Merge when all tests are passing label May 22, 2025
@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@KristofferC KristofferC mentioned this pull request May 28, 2025
58 tasks
KristofferC pushed a commit that referenced this pull request May 28, 2025
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Jun 4, 2025
@KristofferC KristofferC mentioned this pull request Jun 4, 2025
71 tasks
KristofferC pushed a commit that referenced this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.11 Change should be backported to release-1.11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Union{Nothing,Int} field in mutable struct, when set to nothing, sometimes reads as garbage Int in >=1.11
5 participants