This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Update profile in loop versioning and unrolling
> > scale_bbs_frequencies_int does not like numerator to be greater than
> > 65536, the magic constants on both places ensure that we do not pass it
> > invalid inputs.
> I see, it is even asserted there. Can't just scale_bbs_frequencies_int
> care itself to scale down num/den to stay within range rather than
> forcing users to add such interesting checks?
I a bit fear allowing the frequencies to be scalled by (almost)
arbitrary factors (e.g. if we scale frequencies in some area by 1000,
they are likely to grow much over BB_FREQ_MAX); I think there need
to be some similar checks to avoid making absurd decisions because
of previous mistakes in profile updating.