]> git.ipfire.org Git - thirdparty/gcc.git/commit
profile: Don't instrument fake exit edges after musttail [PR118442]
authorJakub Jelinek <jakub@redhat.com>
Wed, 26 Mar 2025 12:59:16 +0000 (13:59 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 26 Mar 2025 12:59:16 +0000 (13:59 +0100)
commitfb71d7c8e7ce4b061e40cd29cd77a4cfd7a256af
tree845e5cbcfc2f94a2a4989c71d8031e93d085fed4
parent7b7c0fe37332290fad9b31bf3ae05c28375e0a76
profile: Don't instrument fake exit edges after musttail [PR118442]

When -fprofile-generate is used musttail often fails because the
compiler adds instrumentation after the tail calls.

This patch ignores EDGE_FAKE edges added from musttail calls to EXIT.

2025-03-26  Jakub Jelinek  <jakub@redhat.com>
    Andi Kleen  <ak@gcc.gnu.org>

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
gcc/testsuite/c-c++-common/pr118442.c [new file with mode: 0644]