diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2025-09-04 17:23:20 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@ucw.cz> | 2025-09-04 17:25:26 +0200 |
commit | 1da3c4d90e678af0fed89c5638c97a41e5e04547 (patch) | |
tree | dac6ecc0880281a7a583ea017a5869211065da38 /libgomp/testsuite/libgomp.fortran/target-is-initial-host-2.f90 | |
parent | 640fd2f0ccdce4a74f239af818dee409ea7f5587 (diff) | |
download | gcc-1da3c4d90e678af0fed89c5638c97a41e5e04547.zip gcc-1da3c4d90e678af0fed89c5638c97a41e5e04547.tar.gz gcc-1da3c4d90e678af0fed89c5638c97a41e5e04547.tar.bz2 |
Fix scalng of auto-fdo profiles in liner
with auto-fdo it is possible that function bar with non-zero profile is inlined
into foo with zero profile and foo is the only caller of it. In this case
we currently scale bar to also have zero profile which makes it optimized
for size. With normal profiles this does not happen, since basic blocks with
non-zero count must have some way to be reached.
This patch makes inliner to scale caller in this case which mitigates the
problem (to some degree).
Bootstrapped/regtested x86_64-linux, plan to commit it shortly.
gcc/ChangeLog:
* ipa-inline-transform.cc (inline_call): If function with
AFDO profile is inlined into function with
GUESSED_GLOBAL0_AFDO or GUESSED_GLOBAL0_ADJUSTED, scale
caller to AFDO profile.
* profile-count.h (profile_count::apply_scale): If num is AFDO
and den is not GUESSED, make result AFDO rather then GUESSED.
Diffstat (limited to 'libgomp/testsuite/libgomp.fortran/target-is-initial-host-2.f90')
0 files changed, 0 insertions, 0 deletions