aboutsummaryrefslogtreecommitdiff
path: root/gcc/doc
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2024-05-15 19:57:22 -0700
committerAndi Kleen <ak@gcc.gnu.org>2024-07-17 21:25:27 -0700
commitb738a63e528db410a1c51fc27db37fe22f0cb397 (patch)
tree3e936f2f0c193eb17934f561847f3fc7a40d0f42 /gcc/doc
parent983daf0e5fdaada5b930374c21455d42d34350be (diff)
downloadgcc-b738a63e528db410a1c51fc27db37fe22f0cb397.zip
gcc-b738a63e528db410a1c51fc27db37fe22f0cb397.tar.gz
gcc-b738a63e528db410a1c51fc27db37fe22f0cb397.tar.bz2
Enable musttail tail conversion even when not optimizing
Enable the tailcall optimization for non optimizing builds, but in this case only checks calls that have the musttail attribute set. This makes musttail work without optimization. This is done with a new late musttail pass that is only active when not optimizing. The new pass relies on tree-cfg to discover musttails. This avoids a ~0.8% compiler run time penalty at -O0. gcc/ChangeLog: PR c/83324 * function.h (struct function): Add has_musttail. * lto-streamer-in.cc (input_struct_function_base): Stream has_musttail. * lto-streamer-out.cc (output_struct_function_base): Dito. * passes.def (pass_musttail): Add. * tree-cfg.cc (notice_special_calls): Record has_musttail. (clear_special_calls): Clear has_musttail. * tree-pass.h (make_pass_musttail): Add. * tree-tailcall.cc (find_tail_calls): Handle only_musttail argument. (tree_optimize_tail_calls_1): Pass on only_musttail. (execute_tail_calls): Pass only_musttail as false. (class pass_musttail): Add. (make_pass_musttail): Add.
Diffstat (limited to 'gcc/doc')
0 files changed, 0 insertions, 0 deletions