r278801 - in /trunk/gcc: ChangeLog profile-count.c

hubicka@gcc.gnu.org hubicka@gcc.gnu.org
Thu Nov 28 07:31:00 GMT 2019


Author: hubicka
Date: Thu Nov 28 07:31:26 2019
New Revision: 278801

URL: https://gcc.gnu.org/viewcvs?rev=278801&root=gcc&view=rev
Log:
Handle correctly global0 and global counters in profile_count::to_sreal_scale

This patch fixes problem in profile_count::to_sreal_scale.  We our porfile
counters can be function local, global (ipa) or function local but globally 0.
The last is used to hold static estimates for functions executed 0 times in
profile.  Now only one 64bit value is stored and if we compute frequency
of global0 counter in global counter we mix them up and return non-zero value
incorrectly.

I also implemented unit test, but will commit sanity checking separately from
fixes: there are multiple bugs in this area I tracked down.

	* profile-count.c (profile_count::to_sreal_scale): Handle correctly
	combination of globa0 and global counters..

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/profile-count.c



More information about the Gcc-cvs mailing list