From f1955b223568e848f25b6ceb17ea3e0ab4107723 Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Tue, 19 Nov 2013 16:50:04 +0000 Subject: Eliminate n_edges macro * basic-block.h (n_edges_for_function): Rename macro to... (n_edges_for_fn): ...this. (n_edges): Eliminate macro as work towards making uses of cfun be explicit. * cfg.c (init_flow): Update for renaming of "n_edges_for_function" to "n_edges_for_fn". * cfg.c (unchecked_make_edge): Remove usage of n_edges macro. (clear_edges): Likewise. (free_edge): Likewise. * cfghooks.c (dump_flow_info): Likewise. * cprop.c (is_too_expensive): Likewise. * df-core.c (df_worklist_dataflow_doublequeue): Likewise. * gcse.c (is_too_expensive): Likewise. (prune_insertions_deletions): Likewise. * mcf.c (create_fixup_graph): Likewise. * sched-rgn.c (haifa_find_rgns): Likewise. * tree-cfg.c (gimple_dump_cfg): Likewise. * var-tracking.c (variable_tracking_main_1): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205044 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gcse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/gcse.c') diff --git a/gcc/gcse.c b/gcc/gcse.c index 5ed99bdf169..a37ac6bc1f8 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -1964,7 +1964,7 @@ prune_insertions_deletions (int n_elems) /* Iterate over the edges counting the number of times each expression needs to be inserted. */ - for (i = 0; i < (unsigned) n_edges; i++) + for (i = 0; i < (unsigned) n_edges_for_fn (cfun); i++) { EXECUTE_IF_SET_IN_BITMAP (pre_insert_map[i], 0, j, sbi) insertions[j]++; @@ -1990,7 +1990,7 @@ prune_insertions_deletions (int n_elems) /* Now prune PRE_INSERT_MAP and PRE_DELETE_MAP based on PRUNE_EXPRS. */ EXECUTE_IF_SET_IN_BITMAP (prune_exprs, 0, j, sbi) { - for (i = 0; i < (unsigned) n_edges; i++) + for (i = 0; i < (unsigned) n_edges_for_fn (cfun); i++) bitmap_clear_bit (pre_insert_map[i], j); for (i = 0; i < (unsigned) last_basic_block; i++) @@ -4069,12 +4069,12 @@ is_too_expensive (const char *pass) which have a couple switch statements. Rather than simply threshold the number of blocks, uses something with a more graceful degradation. */ - if (n_edges > 20000 + n_basic_blocks_for_fn (cfun) * 4) + if (n_edges_for_fn (cfun) > 20000 + n_basic_blocks_for_fn (cfun) * 4) { warning (OPT_Wdisabled_optimization, "%s: %d basic blocks and %d edges/basic block", pass, n_basic_blocks_for_fn (cfun), - n_edges / n_basic_blocks_for_fn (cfun)); + n_edges_for_fn (cfun) / n_basic_blocks_for_fn (cfun)); return true; } -- cgit v1.2.1