[PATCH][stage1] Support profile (BB counts and edge probabilities) in GIMPLE FE.
Martin Liška
mliska@suse.cz
Tue May 7 14:33:00 GMT 2019
On 5/7/19 2:56 PM, Richard Biener wrote:
> But that can use the existing get_hot_bb_threshold since we never want
> to dump -1 in case min_count was never initialized.
Yes. But the function will call:
get_hot_bb_threshold ()
{
if (min_count == -1)
{
gcov_type t = profile_info->sum_max / PARAM_VALUE (HOT_BB_COUNT_FRACTION);
set_hot_bb_threshold (t);
...
which will cause a segfault in non-PGO run. Note that:
static gcov_type min_count = -1;
is a non-exported variable so that's why I simply added the getter.
Hope it's fine as is?
Martin
More information about the Gcc-patches
mailing list