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 exception.
This is
> Am 26.03.2025 um 08:45 schrieb Jakub Jelinek :
>
> On Tue, Mar 25, 2025 at 04:44:45PM +0100, Jakub Jelinek wrote:
>> On Tue, Mar 25, 2025 at 08:33:41AM -0700, Andi Kleen wrote:
2025-03-25 Jakub Jelinek
Andi Kleen
PR gcov-profile/118442
* profile.cc
On Tue, Mar 25, 2025 at 04:44:45PM +0100, Jakub Jelinek wrote:
> On Tue, Mar 25, 2025 at 08:33:41AM -0700, Andi Kleen wrote:
> > > 2025-03-25 Jakub Jelinek
> > > Andi Kleen
> > >
> > > PR gcov-profile/118442
> > > * profile.cc (branch_prob): Ignore EDGE_FAKE edges from musttail call
On Tue, Mar 25, 2025 at 08:33:41AM -0700, Andi Kleen wrote:
> > 2025-03-25 Jakub Jelinek
> > Andi Kleen
> >
> > PR gcov-profile/118442
> > * profile.cc (branch_prob): Ignore EDGE_FAKE edges from musttail calls
> > to EXIT.
> >
> > * c-c++-common/pr118442.c: New test.
> 2025-03-25 Jakub Jelinek
> Andi Kleen
>
> PR gcov-profile/118442
> * profile.cc (branch_prob): Ignore EDGE_FAKE edges from musttail calls
> to EXIT.
>
> * c-c++-common/pr118442.c: New test.
>
> --- gcc/profile.cc.jj 2025-01-02 11:23:16.458517673 +0100
> +
On Mon, Mar 24, 2025 at 09:50:26AM -0700, Andi Kleen wrote:
> gcc/ChangeLog:
>
> PR gcov-profile/118442
> * cfg-flags.def (MUSTTAIL):
> * profile.cc (branch_prob):
> * tree-cfg.cc (gimple_flow_call_edges_add):
Descriptions missing.
> --- a/gcc/cfg-flags.def
> +++ b/gcc/cf