https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45273
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #23 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Note that with the introduction of profile-count.h I chased away most of uses
of double for profile calculation. In predict.c we have last occurence when
combinindg probabilities from predictors:
combined_probability = (((double) combined_probability) * probability
* REG_BR_PROB_BASE / d + 0.5);
These are still REG_BR_PROB_BASE based (unlike rest of code that uses
profile_probability datatype) since that was easier to have in .def file.
Cast to double is there only to get type wide enough for REG_BR_PROB_BASE third
power in the 32bit x86 era. It is set to 10000 that is roughly 2^14 so 43 bits
(with sign bits) is enough that should be good for all reasonable double
implementations. However we could easily change it to int64_t.