Skip to content

Sync from rust 2025/08/03 #746

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 16 commits into from
Aug 4, 2025
Merged

Sync from rust 2025/08/03 #746

merged 16 commits into from
Aug 4, 2025

Conversation

antoyo
Copy link
Contributor

@antoyo antoyo commented Aug 3, 2025

No description provided.

bjorn3 and others added 16 commits July 21, 2025 07:58
The modules vec can already contain serialized modules and there is no
need to distinguish between cached and non-cached cgus at LTO time.
And move exported_symbols_for_lto call from backends to cg_ssa.
Various refactors to the LTO handling code (part 2)

Continuing from rust-lang/rust#143388 this removes a bit of dead code and moves the LTO symbol export calculation from individual backends to cg_ssa.
Nobody seems to actually use this, while still adding some extra
complexity to the already rather complex codegen coordinator code.
It is also not supported by any backend other than the LLVM backend.
Implement support for `become` and explicit tail call codegen for the LLVM backend

This PR implements codegen of explicit tail calls via `become` in `rustc_codegen_ssa` and support within the LLVM backend. Completes a task on (rust-lang/rust#112788). This PR implements all the necessary bits to make explicit tail calls usable, other backends have received stubs for now and will ICE if you use `become` on them. I suspect there is some bikeshedding to be done on how we should go about implementing this for other backends, but it should be relatively straightforward for GCC after this is merged.

During development I also put together a POC bytecode VM based on tail call dispatch to test these changes out and analyze the codegen to make sure it generates expected assembly. That is available [here](https://github.com/xacrimon/tcvm).
@antoyo antoyo merged commit 482e854 into master Aug 4, 2025
38 checks passed
@antoyo antoyo deleted the sync_from_rust_2025_08_03 branch August 4, 2025 00:18
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.

8 participants