This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Update profile in loop versioning and unrolling


Hello,

> > 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.

Zdenek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]