rust/compiler
Stuart Cook 8628b78f24
Rollup 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 (https://github.com/rust-lang/rust/issues/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).
2025-07-31 15:42:00 +10:00
..
rustc rename stable_mir to rustc_public, and rustc_smir to rustc_public_bridge 2025-07-14 09:25:54 +00:00
rustc_abi Reuse sign_extend helper 2025-07-29 14:17:48 +00:00
rustc_arena Introduce Arena::try_alloc_from_iter. 2025-04-19 01:13:18 +00:00
rustc_ast Don't lint against named labels in naked_asm! 2025-07-26 00:42:21 +01:00
rustc_ast_ir
rustc_ast_lowering Auto merge of #144557 - cjgillot:lower-more-span, r=compiler-errors 2025-07-29 17:39:48 +00:00
rustc_ast_passes use let chains in ast, borrowck, codegen, const_eval 2025-07-28 06:08:48 +05:00
rustc_ast_pretty use let chains in ast, borrowck, codegen, const_eval 2025-07-28 06:08:48 +05:00
rustc_attr_data_structures coverage: Rename CoverageStatus to CoverageAttrKind 2025-07-29 19:55:54 +10:00
rustc_attr_parsing coverage: Rename CoverageStatus to CoverageAttrKind 2025-07-29 19:55:54 +10:00
rustc_baked_icu_data
rustc_borrowck Rollup merge of #144666 - compiler-errors:correct-late, r=lqd 2025-07-30 17:59:40 +10:00
rustc_builtin_macros expand: Micro-optimize prelude injection 2025-07-28 17:35:09 +03:00
rustc_codegen_cranelift Update codegen_{cranelift,gcc} and opt-dist to use build.compiletest-allow-stage0 2025-07-30 19:55:07 +08:00
rustc_codegen_gcc Rollup merge of #144232 - xacrimon:explicit-tail-call, r=WaffleLapkin 2025-07-31 15:42:00 +10:00
rustc_codegen_llvm Rollup merge of #144232 - xacrimon:explicit-tail-call, r=WaffleLapkin 2025-07-31 15:42:00 +10:00
rustc_codegen_ssa Rollup merge of #144232 - xacrimon:explicit-tail-call, r=WaffleLapkin 2025-07-31 15:42:00 +10:00
rustc_const_eval Rename trait_of_item -> trait_of_assoc 2025-07-28 09:53:50 -05:00
rustc_data_structures Allow pretty printing paths with -Zself-profile-events=args 2025-07-25 22:24:21 +02:00
rustc_driver Remove recursion_limit increases. 2025-04-02 16:25:27 +11:00
rustc_driver_impl Rollup merge of #143719 - xizheyin:142812-1, r=jieyouxu 2025-07-18 04:27:51 +02:00
rustc_error_codes Update uitest stderrs 2025-07-23 13:33:23 +02:00
rustc_error_messages Remove unused feature gates 2025-06-28 23:36:46 +00:00
rustc_errors feat: Right align line numbers 2025-07-28 16:32:11 -06:00
rustc_expand Rollup merge of #143607 - JonathanBrouwer:proc_macro_attrs, r=jdonszelmann,traviscross 2025-07-28 01:16:38 +02:00
rustc_feature Mitigate #[align] name resolution ambiguity regression with a rename 2025-07-19 01:42:30 +08:00
rustc_fluent_macro Remove all unused feature gates from the compiler 2025-06-08 14:50:42 +00:00
rustc_fs_util Retry if creating temp fails with access denied 2025-04-25 11:28:36 +00:00
rustc_graphviz
rustc_hashes
rustc_hir Rollup merge of #144578 - FractalFir:m68k_fix, r=compiler-errors 2025-07-29 16:16:45 +10:00
rustc_hir_analysis Rename impl_of_method -> impl_of_assoc 2025-07-28 09:54:53 -05:00
rustc_hir_pretty parse const trait Trait 2025-07-17 18:06:26 +08:00
rustc_hir_typeck Auto merge of #144405 - lcnr:hir-typeck-uniquify, r=BoxyUwU 2025-07-31 00:32:55 +00:00
rustc_incremental Auto merge of #139758 - Zoxc:thread-local-graph, r=oli-obk 2025-05-07 12:39:54 +00:00
rustc_index use div_ceil instead of manual logic 2025-07-05 10:55:42 +02:00
rustc_index_macros In rustc_mir_tranform, iterate over index newtypes instead of ints 2025-04-12 11:53:07 +00:00
rustc_infer handle region dependent goals due to infer vars 2025-07-30 14:01:37 +02:00
rustc_interface Stop compilation if macro expansion failed 2025-07-25 23:46:28 +02:00
rustc_lexer test(lexer): Add frontmatter unit test 2025-07-10 10:25:29 -05:00
rustc_lint Create two methods to fix find_oldest_ancestor_in_same_ctxt 2025-07-29 14:54:47 +08:00
rustc_lint_defs Rollup merge of #144014 - dianne:edition-guide-links, r=estebank 2025-07-24 15:08:21 +02:00
rustc_llvm Rollup merge of #144232 - xacrimon:explicit-tail-call, r=WaffleLapkin 2025-07-31 15:42:00 +10:00
rustc_log Add documentation for init_logger_with_additional_layer 2025-06-12 12:11:15 +02:00
rustc_macros Implement AST visitors using a derive macro. 2025-07-22 01:52:34 +00:00
rustc_metadata Support multiple crate versions in --extern-html-root-url 2025-07-28 13:34:03 +01:00
rustc_middle Auto merge of #116316 - cjgillot:incr-privacy, r=petrochenkov 2025-07-30 21:29:47 +00:00
rustc_mir_build fix: Reject upvar scrutinees for loop_match 2025-07-28 22:24:58 +09:00
rustc_mir_dataflow use let chains in hir, lint, mir 2025-07-28 06:10:14 +05:00
rustc_mir_transform Rollup merge of #143672 - beepster4096:box_drop_flags_again, r=oli-obk 2025-07-31 15:41:59 +10:00
rustc_monomorphize Rename impl_of_method -> impl_of_assoc 2025-07-28 09:54:53 -05:00
rustc_next_trait_solver Auto merge of #144405 - lcnr:hir-typeck-uniquify, r=BoxyUwU 2025-07-31 00:32:55 +00:00
rustc_parse Rollup merge of #144589 - compiler-errors:postfix-yield-after-cast, r=petrochenkov 2025-07-29 23:50:37 +10:00
rustc_parse_format update to literal-escaper-0.0.5 2025-07-08 10:16:44 +00:00
rustc_passes Rename impl_of_method -> impl_of_assoc 2025-07-28 09:54:53 -05:00
rustc_pattern_analysis Rollup merge of #144171 - Nadrieril:exhaustive-witnesses, r=davidtwco 2025-07-26 01:15:04 -05:00
rustc_privacy use let chains in mir, resolve, target 2025-07-28 06:10:36 +05:00
rustc_proc_macro update to literal-escaper-0.0.5 2025-07-08 10:16:44 +00:00
rustc_public remove movability from RigidTy::Coroutine and AggregateKind::Coroutine 2025-07-24 18:26:08 +08:00
rustc_public_bridge Remove useless lifetime parameter. 2025-07-23 23:54:37 +00:00
rustc_query_impl Remove unused allow attrs 2025-07-07 12:58:16 +00:00
rustc_query_system Auto merge of #144469 - Kivooeo:chains-cleanup, r=SparrowLii 2025-07-28 05:25:23 +00:00
rustc_resolve Rollup merge of #144605 - LorrensP-2158466:cache-extern-prelude, r=petrochenkov 2025-07-29 18:55:20 -04:00
rustc_sanitizers Rename impl_of_method -> impl_of_assoc 2025-07-28 09:54:53 -05:00
rustc_serialize use div_ceil instead of manual logic 2025-07-05 10:55:42 +02:00
rustc_session Auto merge of #144562 - matthiaskrgr:rollup-mlvn7qo, r=matthiaskrgr 2025-07-28 08:50:59 +00:00
rustc_span Create two methods to fix find_oldest_ancestor_in_same_ctxt 2025-07-29 14:54:47 +08:00
rustc_symbol_mangling use codegen_instance_attrs where an instance is (easily) available 2025-07-16 23:24:32 +02:00
rustc_target Rollup merge of #144640 - FractalFir:m68k_arch, r=Urgau 2025-07-29 18:55:22 -04:00
rustc_thread_pool Correct comments. 2025-06-28 17:58:21 +08:00
rustc_trait_selection Auto merge of #144405 - lcnr:hir-typeck-uniquify, r=BoxyUwU 2025-07-31 00:32:55 +00:00
rustc_traits Consider param-env for fast path 2025-07-20 17:45:01 +00:00
rustc_transmute compiler: Parse p- specs in datalayout string, allow definition of custom default data address space 2025-07-07 09:04:53 +02:00
rustc_ty_utils Rename trait_of_item -> trait_of_assoc 2025-07-28 09:53:50 -05:00
rustc_type_ir Auto merge of #144405 - lcnr:hir-typeck-uniquify, r=BoxyUwU 2025-07-31 00:32:55 +00:00
rustc_type_ir_macros Split TypeFolder and FallibleTypeFolder 2025-04-15 18:30:35 +00:00