]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Rename profile_status_for_function to profile_status_for_fn.
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 9 Dec 2013 19:53:08 +0000 (19:53 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Mon, 9 Dec 2013 19:53:08 +0000 (19:53 +0000)
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

gcc/ChangeLog
gcc/basic-block.h
gcc/cfg.c
gcc/cgraphbuild.c
gcc/lto-streamer-in.c
gcc/lto-streamer-out.c
gcc/predict.c
gcc/tree-cfg.c
gcc/tree-inline.c

index 065b059484361d4b545341fa3042ea3296b8d26e..c5b509ded8c51f5681e49feee7dba030252c51f9 100644 (file)
@@ -1,3 +1,18 @@
+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...
index 1471972c4bbe7e6b44af82060f4d8c32c0b0bb11..da93c6fbca8edc9af2e949d4460e24bb9594b837 100644 (file)
@@ -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)])
index 6bceca5ed26f14deda54d17ad82ed4f4b7dfa792..786fe4838fffd2552944ed3566c4bcbd6f19114f 100644 (file)
--- 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))
index bd5a78dee2a908e72e0d4265d86e9a7246b06845..689b421c30b662a5e1adc183bf765328f2bb786c 100644 (file)
@@ -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)
index 91fb12d1183ee2346c6d6ab93b5eb44ff5cbb5a7..8dc94bd6ece3ebcba3b77ab5a31102a077b29a7f 100644 (file)
@@ -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);
 
index 50d8bf9e786bfd539bf618ca74e9fca9570c8362..d1d545bef11008b25cba11158600fb30c45035d4 100644 (file)
@@ -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));
index 1cd3fa621ea5103f3d16761b23b8a9cd81a96b6c..e959a3bd050b35731db97fc1cf87d9b387d30d63 100644 (file)
@@ -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);
index 998ee26e7d6f30d8460004fc1a6e0ea1680a974d..6c2cc16b8b6a6e83fab6c555c174a32f1293eed5 100644 (file)
@@ -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);
index f42ade0214539fb9346daf73d9bcf6cb9d5cf236..abc216dcdc12e7b98ea922305528eb4572981e87 100644 (file)
@@ -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);