From 62003be57dd30dbad06fb6245332ac3f2f7c7982 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 16 Nov 2017 12:08:12 +0100 Subject: [PATCH] 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 --- gcc/ChangeLog | 7 +++++++ gcc/cfg.c | 42 ------------------------------------------ gcc/cfg.h | 3 --- 3 files changed, 7 insertions(+), 45 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9211a8b33c5..1c1944ef212 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-11-14 Jan Hubicka + + * 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 * tree-ssa-loop-manip.c diff --git a/gcc/cfg.c b/gcc/cfg.c index 062788afdc0..34bc11239f6 100644 --- a/gcc/cfg.c +++ b/gcc/cfg.c @@ -916,48 +916,6 @@ update_bb_profile_for_threading (basic_block bb, gcc_assert (bb == taken_edge->src); } -/* 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. */ diff --git a/gcc/cfg.h b/gcc/cfg.h index e8129ddb190..8ac1d785c48 100644 --- a/gcc/cfg.h +++ b/gcc/cfg.h @@ -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); -- 2.30.2