r273789 - in /trunk/gcc: ChangeLog ipa-profile....
luoxhu@gcc.gnu.org
luoxhu@gcc.gnu.org
Thu Jul 25 09:20:00 GMT 2019
Author: luoxhu
Date: Thu Jul 25 09:20:13 2019
New Revision: 273789
URL: https://gcc.gnu.org/viewcvs?rev=273789&root=gcc&view=rev
Log:
Generalize get_most_common_single_value to return n_th value & count
Currently get_most_common_single_value could only return the max hist
<value, count>, add sort after reading from disk, then it return nth value
in later use. Rename it to get_nth_most_common_value.
gcc/ChangeLog:
2019-07-15 Xiong Hu Luo <luoxhu@linux.ibm.com>
* ipa-profile.c (get_most_common_single_value): Use
get_nth_most_common_value.
* profile.c (sort_hist_value): New function.
(compute_value_histograms): Call sort_hist_value to sort the
values after loading from disk.
* value-prof.c (get_most_common_single_value): Rename to ...
get_nth_most_common_value. Add input params n, return
the n_th value and count.
(gimple_divmod_fixed_value_transform): Use
get_nth_most_common_value.
(gimple_ic_transform): Likewise.
(gimple_stringops_transform): Likewise.
* value-prof.h (get_most_common_single_value): Add input params
n, default to 0.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-profile.c
trunk/gcc/profile.c
trunk/gcc/value-prof.c
trunk/gcc/value-prof.h
More information about the Gcc-cvs
mailing list