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.