]> git.ipfire.org Git - thirdparty/gcc.git/commit
Scale up auto-profile counts
authorJan Hubicka <hubicka@ucw.cz>
Sun, 22 Jun 2025 01:26:36 +0000 (03:26 +0200)
committerJan Hubicka <hubicka@ucw.cz>
Sun, 22 Jun 2025 01:26:36 +0000 (03:26 +0200)
commitdda86c80bca2300a47f91bcfc589951df9c7f1be
tree963d4eae79b1c617700f466e9f560d387aa8fbca
parenteb8ee105706569c9a03f3de9519f6ab8006c3f1e
Scale up auto-profile counts

This patch makes auto-profile counts to scale up when the train run has
too small maximal count.  This still happens on moderately sized train runs
such as SPEC2017 ref datasets and helps to avoid rounding errors in cases
where number of samples is small.

gcc/ChangeLog:

* auto-profile.cc (autofdo::afdo_count_scale): New.
(autofdo_source_profile::update_inlined_ind_target): Scale
counts.
(autofdo_source_profile::read): Set scale and dump
statistics.
(afdo_indirect_call): Scale.
(afdo_set_bb_count): Scale.
(afdo_find_equiv_class): Fix dumps.
(afdo_annotate_cfg): Scale.
gcc/auto-profile.cc