Implement support for `become` and explicit tail call codegen for the LLVM backend by xacrimon · Pull Request #144232 · rust-lang/rust
labels
Jul 20, 2025
rustbot
added
the
S-waiting-on-author
label
Jul 21, 2025
rustbot
added
S-waiting-on-review
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.labels
Jul 21, 2025
bors
added
S-waiting-on-bors
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.labels
Jul 30, 2025Zalathar added a commit to Zalathar/rust that referenced this pull request
Jul 31, 2025…fleLapkin 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#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).
bors added a commit that referenced this pull request
Jul 31, 2025Rollup of 6 pull requests Successful merges: - #135975 (Implement `push_mut`) - #143672 (Fix Box allocator drop elaboration) - #144232 (Implement support for `become` and explicit tail call codegen for the LLVM backend) - #144663 (coverage: Re-land "Enlarge empty spans during MIR instrumentation") - #144683 (Simplify library dependencies on `compiler-builtins`) - #144685 (Only extract lang items once in codegen_fn_attrs) r? `@ghost` `@rustbot` modify labels: rollup
bors added a commit that referenced this pull request
Jul 31, 2025Rollup of 6 pull requests Successful merges: - #135975 (Implement `push_mut`) - #143672 (Fix Box allocator drop elaboration) - #144232 (Implement support for `become` and explicit tail call codegen for the LLVM backend) - #144663 (coverage: Re-land "Enlarge empty spans during MIR instrumentation") - #144685 (Only extract lang items once in codegen_fn_attrs) - #144717 (Move `rustc_middle::parameterized`) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer added a commit that referenced this pull request
Jul 31, 2025Rollup merge of #144232 - xacrimon:explicit-tail-call, r=WaffleLapkin 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 (#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).
tnuha
mentioned this pull request
samueltardieu added a commit to samueltardieu/rust that referenced this pull request
Aug 3, 2025…ffleLapkin Additional tce tests r? `@oli-obk` Adds known-bug tests for LLVM emissions regarding indirect operands for TCE. Also includes a test, `indexer.rs`, referring to function_table behavior described by the RFC. Depends on rust-lang#144232 Closes rust-lang#144293
samueltardieu added a commit to samueltardieu/rust that referenced this pull request
Aug 3, 2025…ffleLapkin Additional tce tests r? ``@oli-obk`` Adds known-bug tests for LLVM emissions regarding indirect operands for TCE. Also includes a test, `indexer.rs`, referring to function_table behavior described by the RFC. Depends on rust-lang#144232 Closes rust-lang#144293
GuillaumeGomez pushed a commit to GuillaumeGomez/rust that referenced this pull request
Aug 4, 2025…fleLapkin 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#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).
tgross35 added a commit to tgross35/rust that referenced this pull request
Aug 6, 2025…ffleLapkin Additional tce tests r? ``@oli-obk`` Adds known-bug tests for LLVM emissions regarding indirect operands for TCE. Also includes a test, `indexer.rs`, referring to function_table behavior described by the RFC. Depends on rust-lang#144232 Closes rust-lang#144293
Zalathar added a commit to Zalathar/rust that referenced this pull request
Aug 7, 2025…ffleLapkin,tgross35 Additional tce tests r? `@oli-obk` Adds known-bug tests for LLVM emissions regarding indirect operands for TCE. Also includes a test, `indexer.rs`, referring to function_table behavior described by the RFC. Depends on rust-lang#144232 Closes rust-lang#144293
rust-timer added a commit that referenced this pull request
Aug 7, 2025Rollup merge of #144650 - Borgerr:additional-tce-tests, r=WaffleLapkin,tgross35 Additional tce tests r? `@oli-obk` Adds known-bug tests for LLVM emissions regarding indirect operands for TCE. Also includes a test, `indexer.rs`, referring to function_table behavior described by the RFC. Depends on #144232 Closes #144293
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request
Aug 8, 2025…n,tgross35 Additional tce tests r? `@oli-obk` Adds known-bug tests for LLVM emissions regarding indirect operands for TCE. Also includes a test, `indexer.rs`, referring to function_table behavior described by the RFC. Depends on rust-lang/rust#144232 Closes rust-lang/rust#144293
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request
Aug 11, 2025…n,tgross35 Additional tce tests r? `@oli-obk` Adds known-bug tests for LLVM emissions regarding indirect operands for TCE. Also includes a test, `indexer.rs`, referring to function_table behavior described by the RFC. Depends on rust-lang/rust#144232 Closes rust-lang/rust#144293
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request
Aug 18, 2025…n,tgross35 Additional tce tests r? `@oli-obk` Adds known-bug tests for LLVM emissions regarding indirect operands for TCE. Also includes a test, `indexer.rs`, referring to function_table behavior described by the RFC. Depends on rust-lang/rust#144232 Closes rust-lang/rust#144293
Kobzol pushed a commit to Kobzol/rustc_codegen_gcc that referenced this pull request
Dec 21, 2025…n,tgross35 Additional tce tests r? `@oli-obk` Adds known-bug tests for LLVM emissions regarding indirect operands for TCE. Also includes a test, `indexer.rs`, referring to function_table behavior described by the RFC. Depends on rust-lang/rust#144232 Closes rust-lang/rust#144293
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters