aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2013-12-09 19:53:08 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2013-12-09 19:53:08 +0000
commitea19eb9fba65626b303781048830f5db22a1cfa5 (patch)
treeec787489d8c06f8de6edf15db1529b7a23597d34
parent3e248e069105af09e94110b38623cbd925c2ac22 (diff)
downloadgcc-ea19eb9fba65626b303781048830f5db22a1cfa5.zip
gcc-ea19eb9fba65626b303781048830f5db22a1cfa5.tar.gz
gcc-ea19eb9fba65626b303781048830f5db22a1cfa5.tar.bz2
Rename profile_status_for_function to profile_status_for_fn.
gcc/ * basic-block.h (profile_status_for_function): Rename to... (profile_status_for_fn): ...this. * cfg.c (check_bb_profile): Update for renaming. * cgraphbuild.c (compute_call_stmt_bb_frequency): Likewise. * lto-streamer-in.c (input_cfg): Likewise. * lto-streamer-out.c (output_cfg): Likewise. * predict.c (maybe_hot_frequency_p, maybe_hot_count_p, maybe_hot_bb_p, probably_never_executed) (handle_missing_profiles): Likewise. * tree-cfg.c (init_empty_tree_cfg_for_function): Likewise. * tree-inline.c (copy_bb, initialize_cfun): Likewise. From-SVN: r205820
-rw-r--r--gcc/ChangeLog15
-rw-r--r--gcc/basic-block.h2
-rw-r--r--gcc/cfg.c2
-rw-r--r--gcc/cgraphbuild.c2
-rw-r--r--gcc/lto-streamer-in.c4
-rw-r--r--gcc/lto-streamer-out.c2
-rw-r--r--gcc/predict.c12
-rw-r--r--gcc/tree-cfg.c2
-rw-r--r--gcc/tree-inline.c4
9 files changed, 30 insertions, 15 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 065b059..c5b509d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,20 @@
2013-12-09 David Malcolm <dmalcolm@redhat.com>
+ * basic-block.h (profile_status_for_function): Rename to...
+ (profile_status_for_fn): ...this.
+
+ * cfg.c (check_bb_profile): Update for renaming.
+ * cgraphbuild.c (compute_call_stmt_bb_frequency): Likewise.
+ * lto-streamer-in.c (input_cfg): Likewise.
+ * lto-streamer-out.c (output_cfg): Likewise.
+ * predict.c (maybe_hot_frequency_p, maybe_hot_count_p,
+ maybe_hot_bb_p, probably_never_executed)
+ (handle_missing_profiles): Likewise.
+ * tree-cfg.c (init_empty_tree_cfg_for_function): Likewise.
+ * tree-inline.c (copy_bb, initialize_cfun): Likewise.
+
+2013-12-09 David Malcolm <dmalcolm@redhat.com>
+
* basic-block.h (label_to_block_map_for_function): Rename to...
(label_to_block_map_for_fn): ...this.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 1471972..da93c6f 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -319,7 +319,7 @@ struct GTY(()) control_flow_graph {
#define n_edges_for_fn(FN) ((FN)->cfg->x_n_edges)
#define last_basic_block_for_fn(FN) ((FN)->cfg->x_last_basic_block)
#define label_to_block_map_for_fn(FN) ((FN)->cfg->x_label_to_block_map)
-#define profile_status_for_function(FN) ((FN)->cfg->x_profile_status)
+#define profile_status_for_fn(FN) ((FN)->cfg->x_profile_status)
#define BASIC_BLOCK_FOR_FN(FN,N) \
((*basic_block_info_for_fn (FN))[(N)])
diff --git a/gcc/cfg.c b/gcc/cfg.c
index 6bceca5..786fe48 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -408,7 +408,7 @@ check_bb_profile (basic_block bb, FILE * file, int indent, int flags)
memset ((void *) s_indent, ' ', (size_t) indent);
s_indent[indent] = '\0';
- if (profile_status_for_function (fun) == PROFILE_ABSENT)
+ if (profile_status_for_fn (fun) == PROFILE_ABSENT)
return;
if (bb != EXIT_BLOCK_PTR_FOR_FN (fun))
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index bd5a78d..689b421 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -208,7 +208,7 @@ compute_call_stmt_bb_frequency (tree decl, basic_block bb)
(DECL_STRUCT_FUNCTION (decl))->frequency;
int freq = bb->frequency;
- if (profile_status_for_function (DECL_STRUCT_FUNCTION (decl)) == PROFILE_ABSENT)
+ if (profile_status_for_fn (DECL_STRUCT_FUNCTION (decl)) == PROFILE_ABSENT)
return CGRAPH_FREQ_BASE;
if (!entry_freq)
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 91fb12d..8dc94bd 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -632,8 +632,8 @@ input_cfg (struct lto_input_block *ib, struct data_in *data_in,
init_empty_tree_cfg_for_function (fn);
init_ssa_operands (fn);
- profile_status_for_function (fn) = streamer_read_enum (ib, profile_status_d,
- PROFILE_LAST);
+ profile_status_for_fn (fn) = streamer_read_enum (ib, profile_status_d,
+ PROFILE_LAST);
bb_count = streamer_read_uhwi (ib);
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 50d8bf9..d1d545b 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -1630,7 +1630,7 @@ output_cfg (struct output_block *ob, struct function *fn)
ob->main_stream = ob->cfg_stream;
streamer_write_enum (ob->main_stream, profile_status_d, PROFILE_LAST,
- profile_status_for_function (fn));
+ profile_status_for_fn (fn));
/* Output the number of the highest basic block. */
streamer_write_uhwi (ob, last_basic_block_for_fn (fn));
diff --git a/gcc/predict.c b/gcc/predict.c
index 1cd3fa6..e959a3b 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -121,7 +121,7 @@ maybe_hot_frequency_p (struct function *fun, int freq)
if (node->frequency == NODE_FREQUENCY_HOT)
return true;
}
- if (profile_status_for_function (fun) == PROFILE_ABSENT)
+ if (profile_status_for_fn (fun) == PROFILE_ABSENT)
return true;
if (node->frequency == NODE_FREQUENCY_EXECUTED_ONCE
&& freq < (ENTRY_BLOCK_PTR_FOR_FN (fun)->frequency * 2 / 3))
@@ -164,7 +164,7 @@ set_hot_bb_threshold (gcov_type min)
static inline bool
maybe_hot_count_p (struct function *fun, gcov_type count)
{
- if (fun && profile_status_for_function (fun) != PROFILE_READ)
+ if (fun && profile_status_for_fn (fun) != PROFILE_READ)
return true;
/* Code executed at most once is not hot. */
if (profile_info->runs >= count)
@@ -179,7 +179,7 @@ bool
maybe_hot_bb_p (struct function *fun, const_basic_block bb)
{
gcc_checking_assert (fun);
- if (profile_status_for_function (fun) == PROFILE_READ)
+ if (profile_status_for_fn (fun) == PROFILE_READ)
return maybe_hot_count_p (fun, bb->count);
return maybe_hot_frequency_p (fun, bb->frequency);
}
@@ -239,7 +239,7 @@ probably_never_executed (struct function *fun,
gcov_type count, int frequency)
{
gcc_checking_assert (fun);
- if (profile_status_for_function (fun) == PROFILE_READ)
+ if (profile_status_for_fn (fun) == PROFILE_READ)
{
int unlikely_count_fraction = PARAM_VALUE (UNLIKELY_BB_COUNT_FRACTION);
if (count * unlikely_count_fraction >= profile_info->runs)
@@ -2806,7 +2806,7 @@ drop_profile (struct cgraph_node *node, gcov_type call_count)
node->name (), node->order);
}
- profile_status_for_function (fn)
+ profile_status_for_fn (fn)
= (flag_guess_branch_prob ? PROFILE_GUESSED : PROFILE_ABSENT);
node->frequency
= hot ? NODE_FREQUENCY_HOT : NODE_FREQUENCY_NORMAL;
@@ -2869,7 +2869,7 @@ handle_missing_profiles (void)
if (callee->count > 0)
continue;
if (DECL_COMDAT (callee->decl) && fn && fn->cfg
- && profile_status_for_function (fn) == PROFILE_READ)
+ && profile_status_for_fn (fn) == PROFILE_READ)
{
drop_profile (node, 0);
worklist.safe_push (callee);
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 998ee26..6c2cc16 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -182,7 +182,7 @@ init_empty_tree_cfg_for_function (struct function *fn)
{
/* Initialize the basic block array. */
init_flow (fn);
- profile_status_for_function (fn) = PROFILE_ABSENT;
+ profile_status_for_fn (fn) = PROFILE_ABSENT;
n_basic_blocks_for_fn (fn) = NUM_FIXED_BLOCKS;
last_basic_block_for_fn (fn) = NUM_FIXED_BLOCKS;
vec_alloc (basic_block_info_for_fn (fn), initial_cfg_capacity);
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index f42ade02..abc216d 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1792,7 +1792,7 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
{
edge->frequency = new_freq;
if (dump_file
- && profile_status_for_function (cfun) != PROFILE_ABSENT
+ && profile_status_for_fn (cfun) != PROFILE_ABSENT
&& (edge_freq > edge->frequency + 10
|| edge_freq < edge->frequency - 10))
{
@@ -2208,7 +2208,7 @@ initialize_cfun (tree new_fndecl, tree callee_fndecl, gcov_type count)
init_empty_tree_cfg ();
- profile_status_for_function (cfun) = profile_status_for_function (src_cfun);
+ profile_status_for_fn (cfun) = profile_status_for_fn (src_cfun);
ENTRY_BLOCK_PTR_FOR_FN (cfun)->count =
(ENTRY_BLOCK_PTR_FOR_FN (src_cfun)->count * count_scale /
REG_BR_PROB_BASE);