On May 7, 2019 4:33:08 PM GMT+02:00, "Martin Liška" <mli...@suse.cz> wrote: >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?
Oh, I see. Hmm, so we should get away with no min_coubt when all counter kinds are non-pgo? Richard. > >Martin