aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/iresolve.cc
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2025-05-28 12:15:32 +0200
committerJan Hubicka <hubicka@ucw.cz>2025-05-28 12:16:07 +0200
commitaa1b47aa41af2a6a094035bd446504cf352c4d71 (patch)
treea40b00758b184b51939ad759e2563b5691989505 /gcc/fortran/iresolve.cc
parent011962c3fc60d9e34a14babef7c99184750cada6 (diff)
downloadgcc-aa1b47aa41af2a6a094035bd446504cf352c4d71.zip
gcc-aa1b47aa41af2a6a094035bd446504cf352c4d71.tar.gz
gcc-aa1b47aa41af2a6a094035bd446504cf352c4d71.tar.bz2
Do not erase static profile by 0 autofdo profile
This patch makes auto-fdo more careful about keeping info we have from static profile prediction. If all counters in function are 0, we can keep original auto-fdo profile. Having all 0 profile is not very useful especially becuase 0 in autofdo is not very informative and the code still may have been executed in the train run. I added comment about adding GUESSED_GLOBAL0_AFDO which would still preserve info that the function is not hot in the profile, but I would like to do this incrementally. If function has non-zero counters, we can still keep info about zero being reliable from static prediction (i.e. after EH or with cold attribute). gcc/ChangeLog: * auto-profile.cc (update_count_by_afdo_count): New function. (afdo_set_bb_count): Add debug output; only set count if it is non-zero. (afdo_find_equiv_class): Add debug output. (afdo_calculate_branch_prob): Fix formating. (afdo_annotate_cfg): Add debug output; do not erase static profile if autofdo profile is all 0.
Diffstat (limited to 'gcc/fortran/iresolve.cc')
0 files changed, 0 insertions, 0 deletions