Commit 62003be5 by Jan Hubicka Committed by Jan Hubicka

cfg.c (scale_bbs_frequencies_int, [...]): Remove.


	* cfg.c (scale_bbs_frequencies_int,
	cale_bbs_frequencies_gcov_type): Remove.
	* cfg.h (scale_bbs_frequencies_int,
	cale_bbs_frequencies_gcov_type): Remove.

From-SVN: r254812
parent 2a006669
2017-11-14 Jan Hubicka <hubicka@ucw.cz>
* cfg.c (scale_bbs_frequencies_int,
cale_bbs_frequencies_gcov_type): Remove.
* cfg.h (scale_bbs_frequencies_int,
cale_bbs_frequencies_gcov_type): Remove.
2017-11-14 Jan Hubicka <hubicka@ucw.cz>
* tree-ssa-loop-manip.c
(scale_dominated_blocks_in_loop): Update to profile counts.
(tree_transform_and_unroll_loop): Likewise.
......@@ -917,48 +917,6 @@ update_bb_profile_for_threading (basic_block bb,
}
/* Multiply all frequencies of basic blocks in array BBS of length NBBS
by NUM/DEN, in int arithmetic. May lose some accuracy. */
void
scale_bbs_frequencies_int (basic_block *bbs, int nbbs, int num, int den)
{
int i;
if (num < 0)
num = 0;
/* Scale NUM and DEN to avoid overflows. Frequencies are in order of
10^4, if we make DEN <= 10^3, we can afford to upscale by 100
and still safely fit in int during calculations. */
if (den > 1000)
{
if (num > 1000000)
return;
num = RDIV (1000 * num, den);
den = 1000;
}
if (num > 100 * den)
return;
for (i = 0; i < nbbs; i++)
{
bbs[i]->count = bbs[i]->count.apply_scale (num, den);
}
}
/* Multiply all frequencies of basic blocks in array BBS of length NBBS
by NUM/DEN, in gcov_type arithmetic. More accurate than previous
function but considerably slower. */
void
scale_bbs_frequencies_gcov_type (basic_block *bbs, int nbbs, gcov_type num,
gcov_type den)
{
int i;
for (i = 0; i < nbbs; i++)
bbs[i]->count = bbs[i]->count.apply_scale (num, den);
}
/* Multiply all frequencies of basic blocks in array BBS of length NBBS
by NUM/DEN, in profile_count arithmetic. More accurate than previous
function but considerably slower. */
void
......
......@@ -107,9 +107,6 @@ extern basic_block debug_bb_n (int);
extern void dump_bb_info (FILE *, basic_block, int, dump_flags_t, bool, bool);
extern void brief_dump_cfg (FILE *, dump_flags_t);
extern void update_bb_profile_for_threading (basic_block, profile_count, edge);
extern void scale_bbs_frequencies_int (basic_block *, int, int, int);
extern void scale_bbs_frequencies_gcov_type (basic_block *, int, gcov_type,
gcov_type);
extern void scale_bbs_frequencies_profile_count (basic_block *, int,
profile_count, profile_count);
extern void scale_bbs_frequencies (basic_block *, int, profile_probability);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment