Skip to content
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

irinterp: set IR_FLAG_REFINED for narrowed PhiNodes #56391

Merged
merged 1 commit into from
Nov 1, 2024
Merged

Conversation

aviatesk
Copy link
Member

adce_pass! can transform a Union-type PhiNode into a narrower PhiNode, but in such cases, the IR_FLAG_REFINED flag isn’t set on that PhiNode statement. By setting this flag, irinterp can perform statement reprocessing using the narrowed PhiNode, enabling type stability in cases like #56387.

`adce_pass!` can transform a `Union`-type `PhiNode` into a narrower
`PhiNode`, but in such cases, the `IR_FLAG_REFINED` flag isn’t set on
that `PhiNode` statement. By setting this flag, irinterp can perform
statement reprocessing using the narrowed `PhiNode`, enabling type
stability in cases like #56387.

- fixes #56387
@aviatesk aviatesk requested a review from Keno October 30, 2024 08:19
@aviatesk aviatesk merged commit 671e1d8 into master Nov 1, 2024
5 of 7 checks passed
@aviatesk aviatesk deleted the avi/issue56387 branch November 1, 2024 06:02
@MasonProtter
Copy link
Contributor

Is this backportable?

@aviatesk
Copy link
Member Author

aviatesk commented Nov 1, 2024

Yeah, probably backportable up to the point where we defined IR_FLAG_REFINED.

@MasonProtter
Copy link
Contributor

So I just tried to build release-1.10 with this commit and it blew up during building the compiler, but release-1.11 seems to work fine with it.

@MasonProtter MasonProtter added the backport 1.11 Change should be backported to release-1.11 label Nov 1, 2024
@oscardssmith oscardssmith added the compiler:inference Type inference label Nov 1, 2024
@KristofferC KristofferC mentioned this pull request Nov 22, 2024
34 tasks
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 compiler:inference Type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inference fails for a NamedTuple with one field, but succeeds for larger named tuples
3 participants