Skip to content

inference: model Core._svec_ref #57973

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 1 commit into from
Apr 2, 2025
Merged

inference: model Core._svec_ref #57973

merged 1 commit into from
Apr 2, 2025

Conversation

aviatesk
Copy link
Member

@aviatesk aviatesk commented Apr 1, 2025

Core._svec_ref was added in #45062, but its rt, effects and exct have not been properly modeled in the compiler.

This usually isn't a problem because Core._svec_ref gets optimized away by the lift_svec_ref! pass during optimization. However, external abstract interpreters like JET, which don't run these optimizations, can have type inference issues because of this. This commit adds the correct handling.

Also, Base.ismutationfree(Core.Simplevector) was incorrectly returning true. This commit fixes that too.

`Core._svec_ref` was added in #45062, but its rt, effects
and exct have not been properly modeled in the compiler.

This usually isn't a problem because `Core._svec_ref` gets optimized
away by the `lift_svec_ref!` pass during optimization.
However, external abstract interpreters like JET, which don't run these
optimizations, can have type inference issues because of this.
This commit adds the correct handling.

Also, `Base.ismutationfree(Core.Simplevector)` was incorrectly returning
`true`. This commit fixes that too.
@aviatesk aviatesk added the backport 1.12 Change should be backported to release-1.12 label Apr 1, 2025
aviatesk added a commit to aviatesk/JET.jl that referenced this pull request Apr 1, 2025
This test case doesn't pass until JuliaLang/julia#57973 gets backported.
@aviatesk aviatesk merged commit 4b95442 into master Apr 2, 2025
5 of 8 checks passed
@aviatesk aviatesk deleted the avi/model-_svec_ref branch April 2, 2025 03:41
@oscardssmith oscardssmith restored the avi/model-_svec_ref branch April 2, 2025 04:09
@oscardssmith oscardssmith deleted the avi/model-_svec_ref branch April 2, 2025 04:09
aviatesk added a commit that referenced this pull request Apr 2, 2025
aviatesk added a commit that referenced this pull request Apr 2, 2025
@KristofferC KristofferC mentioned this pull request Apr 4, 2025
51 tasks
@aviatesk aviatesk removed the backport 1.12 Change should be backported to release-1.12 label Apr 9, 2025
serenity4 pushed a commit to serenity4/julia that referenced this pull request May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants