]> git.ipfire.org Git - thirdparty/gcc.git/commit
profile: Another profiling musttail call fix [PR119535]
authorJakub Jelinek <jakub@redhat.com>
Tue, 1 Apr 2025 09:45:16 +0000 (11:45 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 1 Apr 2025 09:45:16 +0000 (11:45 +0200)
commitb8de7704428dfe008d195d8da95d6772153b0cc7
treeb3a31525f6b65bf90f612c7f044ad36a91fc620c
parent02409a145946ca0d4f502f43fc3cc20de8b3dea1
profile: Another profiling musttail call fix [PR119535]

As the following testcase shows, EDGE_FAKE edges from musttail calls to
EXIT aren't the only edges we should ignore, we need to ignore also
edges created by the splitting of blocks for the EDGE_FAKE creation that
point from the musttail calls to the fallthrough block, which typically does
the return or with PHIs for the return value.

2025-04-01  Jakub Jelinek  <jakub@redhat.com>

PR gcov-profile/119535
* profile.cc (branch_prob): Ignore any edges from bbs ending with
musttail call, rather than only EDGE_FAKE edges from those to EXIT.

* c-c++-common/pr119535.c: New test.
gcc/profile.cc
gcc/testsuite/c-c++-common/pr119535.c [new file with mode: 0644]