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

Add ABIOverride type for def field #56555

Merged
merged 1 commit into from
Dec 20, 2024
Merged

Add ABIOverride type for def field #56555

merged 1 commit into from
Dec 20, 2024

Conversation

Keno
Copy link
Member

@Keno Keno commented Nov 14, 2024

Together with #54899, this PR is intending to replicate the functionality of #54373, which allowed particular specializations to have a different ABI signature than what would be suggested by the MethodInstance's specTypes field. This PR handles that by adding a special ABIOverwrite type, which, when placed in the owner field of a CodeInstance instructs the system to use the given signature instead.

@Keno Keno force-pushed the kf/abioverwrite branch 2 times, most recently from 31ee1b4 to 52285b4 Compare December 12, 2024 03:32
@Keno
Copy link
Member Author

Keno commented Dec 12, 2024

Per discussion with various folks, we'd prefer to use the CodeInstance def field for this rather than the owner field, so updated accordingly.

@vchuravy vchuravy changed the title WIP: Add ABIOverwrite type for owner field WIP: Add ABIOverwrite type for def field Dec 12, 2024
base/boot.jl Outdated Show resolved Hide resolved
@Keno Keno changed the title WIP: Add ABIOverwrite type for def field Add ABIOverride type for def field Dec 18, 2024
@Keno Keno force-pushed the kf/abioverwrite branch 3 times, most recently from d7e8c58 to 4690885 Compare December 18, 2024 11:29
src/julia.h Outdated Show resolved Hide resolved
@Keno Keno force-pushed the kf/abioverwrite branch 4 times, most recently from c40f362 to af8b410 Compare December 19, 2024 11:09
@Keno
Copy link
Member Author

Keno commented Dec 19, 2024

Alright, I think this is basically working. Still needs some tests and possibly some minor tweaks, but I'd like to get it merged, so that the helpers for looking through def are in, since I'm planning some other PRs that are changing the same code, so I may do those extra bits in a follow up PR.

Together with #54899, this PR is intending to replicate the functionality
of #54373, which allowed particular specializations to have a different
ABI signature than what would be suggested by the MethodInstance's
`specTypes` field. This PR handles that by adding a special `ABIOverwrite`
type, which, when placed in the `def` field of a `CodeInstance`
instructs the system to use the given signature instead.
@Keno Keno merged commit 9bc27ad into master Dec 20, 2024
5 of 7 checks passed
@Keno Keno deleted the kf/abioverwrite branch December 20, 2024 03:45
Keno added a commit that referenced this pull request Dec 20, 2024
This is a natural continuation of the stream of work begun in #53219.
In particular, with #56555, it is important to be able to pass a
CodeInstance, since the ABI may be overwritten and without knowing
that, codegen will generated incorrect code for the CodeInstance.
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