From: Andi Kleen
When -fprofile-generate is used musttail often fails because the
compiler adds instrumentation after the tail calls.
This patch prevents adding exit extra edges after musttail because for a
tail call the execution leaves the function and can never come back
even on a unwind or e
On Wed, Mar 19, 2025 at 12:11:56PM -0700, Andi Kleen wrote:
> From: Andi Kleen
>
> When -fprofile-generate is used musttail often fails because the
> compiler adds instrumentation after the tail calls.
>
> This patch prevents adding exit extra edges after musttail because for a
> tail call the e
> This looks wrong to me. Even tail calls can be terminated with exit,
> perform longjmp, do other things for which stmt_can_terminate_bb_p
> should return true. stmt_can_terminate_bb_p is used in many places, not
> just in the predict instrumentation.
Okay so the check should be only used for s
Andi Kleen writes:
> diff --git a/gcc/input.cc b/gcc/input.cc
> index fabfbfb6eaa..d3b12037ba8 100644
> --- a/gcc/input.cc
> +++ b/gcc/input.cc
> @@ -1325,6 +1325,8 @@ dump_line_table_statistics (void)
>if (s.num_expanded_macros != 0)
> fprintf (stderr, "Average number of tokens per macr