Skip to content

winch: Switch to using cranelift for all trampolines#8109

Merged
elliottt merged 3 commits into
bytecodealliance:mainfrom
elliottt:trevor/winch-remove-trampolines
Mar 21, 2024
Merged

winch: Switch to using cranelift for all trampolines#8109
elliottt merged 3 commits into
bytecodealliance:mainfrom
elliottt:trevor/winch-remove-trampolines

Conversation

@elliottt
Copy link
Copy Markdown
Member

@elliottt elliottt commented Mar 12, 2024

Remove the winch MacroAssembler-based trampolines, and reuse the trampoline-generation from the wasmtime-cranlift crate instead.

Fixes #8098

@elliottt elliottt force-pushed the trevor/winch-remove-trampolines branch from e8412a7 to c2d6f3e Compare March 13, 2024 00:01
@github-actions github-actions Bot added the winch Winch issues or pull requests label Mar 13, 2024
@github-actions
Copy link
Copy Markdown

Subscribe to Label Action

cc @saulecabrera

Details This issue or pull request has been labeled: "winch"

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

  • saulecabrera: winch

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

Learn more.

Copy link
Copy Markdown
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Nice!

@elliottt elliottt force-pushed the trevor/winch-remove-trampolines branch from c2d6f3e to b5162c3 Compare March 13, 2024 23:47
@elliottt elliottt marked this pull request as ready for review March 13, 2024 23:49
@elliottt elliottt requested review from a team as code owners March 13, 2024 23:49
@elliottt elliottt requested review from alexcrichton and cfallin and removed request for a team March 13, 2024 23:49
Comment thread crates/cranelift/src/lib.rs Outdated
@elliottt elliottt requested a review from saulecabrera March 14, 2024 00:05
Copy link
Copy Markdown
Member

@saulecabrera saulecabrera left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

One thing that I wanted to note: Winch is still missing support for emit_trampolines_for_array_call_host_func, would it make sense to implement that function in this PR? I think a follow-up also works!

@elliottt elliottt force-pushed the trevor/winch-remove-trampolines branch 2 times, most recently from d25b23b to 30e21ba Compare March 18, 2024 21:34
@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 labels Mar 18, 2024
@elliottt elliottt force-pushed the trevor/winch-remove-trampolines branch 5 times, most recently from f0f5a9a to f566a6a Compare March 20, 2024 19:46
@elliottt elliottt added this pull request to the merge queue Mar 20, 2024
@elliottt elliottt removed this pull request from the merge queue due to a manual request Mar 20, 2024
@elliottt elliottt force-pushed the trevor/winch-remove-trampolines branch from f566a6a to e56d30d Compare March 21, 2024 00:10
@elliottt elliottt added this pull request to the merge queue Mar 21, 2024
@elliottt elliottt force-pushed the trevor/winch-remove-trampolines branch from c47c87b to 41abec2 Compare March 21, 2024 00:40
@elliottt elliottt removed this pull request from the merge queue due to a manual request Mar 21, 2024
alexcrichton pushed a commit to alexcrichton/wasmtime that referenced this pull request Mar 21, 2024
…e#8109)

* Return the last result through registers in the winch calling convention

* Switch winch over to using cranelift for all trampolines

* Fix unused code warnings
@elliottt elliottt force-pushed the trevor/winch-remove-trampolines branch from 41abec2 to 55c47ff Compare March 21, 2024 16:09
alexcrichton pushed a commit to alexcrichton/wasmtime that referenced this pull request Mar 21, 2024
…e#8109)

* Return the last result through registers in the winch calling convention

* Switch winch over to using cranelift for all trampolines

* Fix unused code warnings
@elliottt elliottt added this pull request to the merge queue Mar 21, 2024
Merged via the queue into bytecodealliance:main with commit d69ba34 Mar 21, 2024
@elliottt elliottt deleted the trevor/winch-remove-trampolines branch March 21, 2024 18:25
saulecabrera added a commit to saulecabrera/wasmtime that referenced this pull request Jul 19, 2024
This register was used as an additional scratch register in the context
of trampolines.

As of bytecodealliance#8109,
trampolines are implemented with Cranelift, so this register alias is
unused.
github-merge-queue Bot pushed a commit that referenced this pull request Jul 19, 2024
This register was used as an additional scratch register in the context
of trampolines.

As of #8109,
trampolines are implemented with Cranelift, so this register alias is
unused.
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 winch Winch issues or pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

winch: Use cranelift as the trampoline compiler

3 participants