summaryrefslogtreecommitdiff
path: root/gcc/tracer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tracer.c')
-rw-r--r--gcc/tracer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tracer.c b/gcc/tracer.c
index 996895006f4..f036c193b57 100644
--- a/gcc/tracer.c
+++ b/gcc/tracer.c
@@ -1,7 +1,7 @@
/* The tracer pass for the GNU compiler.
Contributed by Jan Hubicka, SuSE Labs.
Adapted to work on GIMPLE instead of RTL by Robert Kidd, UIUC.
- Copyright (C) 2001-2013 Free Software Foundation, Inc.
+ Copyright (C) 2001-2014 Free Software Foundation, Inc.
This file is part of GCC.
@@ -230,9 +230,9 @@ find_trace (basic_block bb, basic_block *trace)
static bool
tail_duplicate (void)
{
- fibnode_t *blocks = XCNEWVEC (fibnode_t, last_basic_block);
+ fibnode_t *blocks = XCNEWVEC (fibnode_t, last_basic_block_for_fn (cfun));
basic_block *trace = XNEWVEC (basic_block, n_basic_blocks_for_fn (cfun));
- int *counts = XNEWVEC (int, last_basic_block);
+ int *counts = XNEWVEC (int, last_basic_block_for_fn (cfun));
int ninsns = 0, nduplicated = 0;
gcov_type weighted_insns = 0, traced_insns = 0;
fibheap_t heap = fibheap_new ();
@@ -243,7 +243,7 @@ tail_duplicate (void)
/* Create an oversized sbitmap to reduce the chance that we need to
resize it. */
- bb_seen = sbitmap_alloc (last_basic_block * 2);
+ bb_seen = sbitmap_alloc (last_basic_block_for_fn (cfun) * 2);
bitmap_clear (bb_seen);
initialize_original_copy_tables ();
@@ -256,7 +256,7 @@ tail_duplicate (void)
branch_ratio_cutoff =
(REG_BR_PROB_BASE / 100 * PARAM_VALUE (TRACER_MIN_BRANCH_RATIO));
- FOR_EACH_BB (bb)
+ FOR_EACH_BB_FN (bb, cfun)
{
int n = count_insns (bb);
if (!ignore_bb_p (bb))