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

Various cleanups to the ABI handling code #8875

Merged
merged 2 commits into from
Jul 16, 2024

Conversation

bjorn3
Copy link
Contributor

@bjorn3 bjorn3 commented Jun 26, 2024

I originally did these in the process of adding exception support to Cranelift, but I've extracted it out that branch and rebased it as these changes should be less controversial and it will help with rebasing the exception support branch in the future.

@bjorn3 bjorn3 requested a review from a team as a code owner June 26, 2024 19:02
@bjorn3 bjorn3 requested review from abrown and removed request for a team June 26, 2024 19:02
@bjorn3 bjorn3 force-pushed the abi-cleanup branch 4 times, most recently from acf4cb1 to 42dee0c Compare June 26, 2024 20:02
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:machinst Issues related to instruction selection and the new MachInst backend. cranelift:area:aarch64 Issues related to AArch64 backend. cranelift:area:x64 Issues related to x64 codegen isle Related to the ISLE domain-specific language winch Winch issues or pull requests labels Jun 26, 2024
Copy link

Subscribe to Label Action

cc @cfallin, @fitzgen, @saulecabrera

This issue or pull request has been labeled: "cranelift", "cranelift:area:aarch64", "cranelift:area:machinst", "cranelift:area:x64", "isle", "winch"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle
  • saulecabrera: winch

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Contributor

@abrown abrown left a comment

Choose a reason for hiding this comment

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

I read through this today and it all looks pretty reasonable. I feel like I need to review the safety bits, such as some of that register code, some more, though. Or maybe @jameysharp or @elliottt if you want to jump in?

@bjorn3 bjorn3 force-pushed the abi-cleanup branch 2 times, most recently from 4787e67 to 6766a06 Compare June 28, 2024 20:22
@jameysharp
Copy link
Contributor

I'm excited to take a look next week if nobody else gets to this first!

@jameysharp
Copy link
Contributor

I tried to review this and got kind of lost. I really appreciate that there are nicely separated commits, but I think this would be easier to review if those were fully separate PRs, if that's not too much trouble? It would be especially helpful if you can explain more about the motivation for each change in the commit/PR description.

@bjorn3
Copy link
Contributor Author

bjorn3 commented Jul 5, 2024

Split out #8903 and added some motivation to the commit messages. I will rebase this PR once it merges.

@bjorn3
Copy link
Contributor Author

bjorn3 commented Jul 16, 2024

Rebased

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Looks reasonable, thanks! Just one nit below.

cranelift/codegen/src/machinst/abi.rs Outdated Show resolved Hide resolved
bjorn3 added 2 commits July 16, 2024 18:41
It doesn't seem useful and in several locations we already use a
different Opcode from what the user actually wrote. For example for
tls_value, the implicit stackprobe or the implicit memcpy call for
struct args.

This also makes the recorded call sites more accurately represent the
actual set of call sites by avoiding special casing of pseudo
instructions that happen to include a call.
Instead remove the actual set of defs from the clobber set once they are
known. This reduces the risk of getting the clobber set wrong and makes
it easier to handle cases where the exact set is not known in advance.
@cfallin cfallin added this pull request to the merge queue Jul 16, 2024
Merged via the queue into bytecodealliance:main with commit da4ea5c Jul 16, 2024
67 checks passed
@bjorn3 bjorn3 deleted the abi-cleanup branch July 16, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:aarch64 Issues related to AArch64 backend. cranelift:area:machinst Issues related to instruction selection and the new MachInst backend. cranelift:area:x64 Issues related to x64 codegen cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language winch Winch issues or pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants