]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add --parm auto-profile-bbs
authorJan Hubicka <hubicka@ucw.cz>
Wed, 1 Oct 2025 15:58:00 +0000 (17:58 +0200)
committerJan Hubicka <hubicka@ucw.cz>
Wed, 1 Oct 2025 15:58:00 +0000 (17:58 +0200)
commit16980f46939cde58b22fae372252b449f0158216
tree62133f27bd8994b7c9162021492634a32e7fa342
parentaa214a9d6bda35b324a1e48ba1ae5aa80f5aaa07
Add --parm auto-profile-bbs

This patch adds a parameter that controls whether BB profile is read from auto-profile
or we just scale guessed profile according to known counts.  This is mostly useful as
a first aid when auto-profile goes wrong.  Once we fix enough bugs I think it may be
removed but so far it is quite useful, so I decided to push it.

gcc/ChangeLog:

* auto-profile.cc (determine_scale): Break out from ...
(afdo_adjust_guessed_profile): ... here.
(scale_bb_profile): New function.
(afdo_annotate_cfg): Use it.
* params.opt (auto-profile-bbs): New parmaeter.
* doc/invoke.texi (auto-profile-bbs): Document.
gcc/auto-profile.cc
gcc/doc/invoke.texi
gcc/params.opt