summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/cfg.c42
-rw-r--r--gcc/cfg.h3
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,5 +1,12 @@
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.
diff --git a/gcc/cfg.c b/gcc/cfg.c
index 062788afdc0..34bc11239f6 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -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
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);