except.c (set_nothrow_function_flags): Call cgraph_get_node instead of cgraph_node.
authorMartin Jambor <mjambor@suse.cz>
Mon, 11 Apr 2011 14:57:06 +0000 (16:57 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Mon, 11 Apr 2011 14:57:06 +0000 (16:57 +0200)
2011-04-11  Martin Jambor  <mjambor@suse.cz>

* except.c (set_nothrow_function_flags): Call cgraph_get_node instead
of cgraph_node.
* final.c (rest_of_clean_state): Likewise.
* gimple-iterator.c (update_call_edge_frequencies): Likewise.
* passes.c (pass_init_dump_file): Likewise.
(execute_all_ipa_transforms): Likewise.
(function_called_by_processed_nodes_p): Likewise.
* predict.c (maybe_hot_frequency_p): Likewise.
(probably_never_executed_bb_p): Likewise.
(compute_function_frequency): Likewise.
* tree-nested.c (check_for_nested_with_variably_modified): Likewise.
(unnest_nesting_tree_1): Likewise.
(lower_nested_functions): Likewise.
* tree-optimize.c (execute_fixup_cfg): Likewise.
(tree_rest_of_compilation): Likewise.
* tree-profile.c (gimple_gen_ic_func_profiler): Likewise.
* tree-sra.c (ipa_early_sra): Likewise.
* tree-ssa-loop-ivopts.c (computation_cost): Likewise.
* config/i386/i386.c (ix86_compute_frame_layout): Likewise.
* ipa.c (record_cdtor_fn): Likewise.
* ipa-inline.c (cgraph_early_inlining): Likewise.
(compute_inline_parameters_for_current): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
* ipa-pure-const.c (local_pure_const): Likewise.
* ipa-split.c (split_function): Likewise.
(execute_split_functions): Likewise.
* cgraphbuild.c (build_cgraph_edges): Likewise.
(rebuild_cgraph_edges): Likewise.
(cgraph_rebuild_references): Likewise.
(remove_cgraph_callee_edges): Likewise.
* cgraphunit.c (cgraph_mark_if_needed): Likewise.
(verify_cgraph_node): Likewise.
(cgraph_analyze_functions): Likewise.
(cgraph_preserve_function_body_p): Likewise.
(save_inline_function_body): Likewise.
(save_inline_function_body): Likewise.
* tree-inline.c (copy_bb): Likewise.
(optimize_inline_calls): Likewise.

From-SVN: r172257

20 files changed:
gcc/ChangeLog
gcc/cgraphbuild.c
gcc/cgraphunit.c
gcc/config/i386/i386.c
gcc/except.c
gcc/final.c
gcc/gimple-iterator.c
gcc/ipa-inline.c
gcc/ipa-prop.c
gcc/ipa-pure-const.c
gcc/ipa-split.c
gcc/ipa.c
gcc/passes.c
gcc/predict.c
gcc/tree-inline.c
gcc/tree-nested.c
gcc/tree-optimize.c
gcc/tree-profile.c
gcc/tree-sra.c
gcc/tree-ssa-loop-ivopts.c

index 2ecd35cce59c9b0a79f714c19afbc6994b7a8d2e..dee374f6d6370cf66c297da49e91fc4d3b1efd36 100644 (file)
@@ -1,3 +1,44 @@
+2011-04-11  Martin Jambor  <mjambor@suse.cz>
+
+       * except.c (set_nothrow_function_flags): Call cgraph_get_node instead
+       of cgraph_node.
+       * final.c (rest_of_clean_state): Likewise.
+       * gimple-iterator.c (update_call_edge_frequencies): Likewise.
+       * passes.c (pass_init_dump_file): Likewise.
+       (execute_all_ipa_transforms): Likewise.
+       (function_called_by_processed_nodes_p): Likewise.
+       * predict.c (maybe_hot_frequency_p): Likewise.
+       (probably_never_executed_bb_p): Likewise.
+       (compute_function_frequency): Likewise.
+       * tree-nested.c (check_for_nested_with_variably_modified): Likewise.
+       (unnest_nesting_tree_1): Likewise.
+       (lower_nested_functions): Likewise.
+       * tree-optimize.c (execute_fixup_cfg): Likewise.
+       (tree_rest_of_compilation): Likewise.
+       * tree-profile.c (gimple_gen_ic_func_profiler): Likewise.
+       * tree-sra.c (ipa_early_sra): Likewise.
+       * tree-ssa-loop-ivopts.c (computation_cost): Likewise.
+       * config/i386/i386.c (ix86_compute_frame_layout): Likewise.
+       * ipa.c (record_cdtor_fn): Likewise.
+       * ipa-inline.c (cgraph_early_inlining): Likewise.
+       (compute_inline_parameters_for_current): Likewise.
+       * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
+       * ipa-pure-const.c (local_pure_const): Likewise.
+       * ipa-split.c (split_function): Likewise.
+       (execute_split_functions): Likewise.
+       * cgraphbuild.c (build_cgraph_edges): Likewise.
+       (rebuild_cgraph_edges): Likewise.
+       (cgraph_rebuild_references): Likewise.
+       (remove_cgraph_callee_edges): Likewise.
+       * cgraphunit.c (cgraph_mark_if_needed): Likewise.
+       (verify_cgraph_node): Likewise.
+       (cgraph_analyze_functions): Likewise.
+       (cgraph_preserve_function_body_p): Likewise.
+       (save_inline_function_body): Likewise.
+       (save_inline_function_body): Likewise.
+       * tree-inline.c (copy_bb): Likewise.
+       (optimize_inline_calls): Likewise.
+
 2011-04-11  Martin Jambor  <mjambor@suse.cz>
 
        PR tree-optimization/48195
index 3948cf628024e875a8c56a0e3b843293b0644a79..47199f3a783204ce0494d43b302f5aecdb6cb6e4 100644 (file)
@@ -340,7 +340,7 @@ static unsigned int
 build_cgraph_edges (void)
 {
   basic_block bb;
-  struct cgraph_node *node = cgraph_node (current_function_decl);
+  struct cgraph_node *node = cgraph_get_node (current_function_decl);
   struct pointer_set_t *visited_nodes = pointer_set_create ();
   gimple_stmt_iterator gsi;
   tree decl;
@@ -451,7 +451,7 @@ unsigned int
 rebuild_cgraph_edges (void)
 {
   basic_block bb;
-  struct cgraph_node *node = cgraph_node (current_function_decl);
+  struct cgraph_node *node = cgraph_get_node (current_function_decl);
   gimple_stmt_iterator gsi;
 
   cgraph_node_remove_callees (node);
@@ -502,7 +502,7 @@ void
 cgraph_rebuild_references (void)
 {
   basic_block bb;
-  struct cgraph_node *node = cgraph_node (current_function_decl);
+  struct cgraph_node *node = cgraph_get_node (current_function_decl);
   gimple_stmt_iterator gsi;
 
   ipa_remove_all_references (&node->ref_list);
@@ -549,7 +549,7 @@ struct gimple_opt_pass pass_rebuild_cgraph_edges =
 static unsigned int
 remove_cgraph_callee_edges (void)
 {
-  cgraph_node_remove_callees (cgraph_node (current_function_decl));
+  cgraph_node_remove_callees (cgraph_get_node (current_function_decl));
   return 0;
 }
 
index 15660a7e7f810db13f3d6fdc1c638ac95fbb774a..e0e51dc3d7dd2f306d8d89a229fd18bb4c783ae9 100644 (file)
@@ -390,7 +390,7 @@ cgraph_finalize_function (tree decl, bool nested)
 void
 cgraph_mark_if_needed (tree decl)
 {
-  struct cgraph_node *node = cgraph_node (decl);
+  struct cgraph_node *node = cgraph_get_node (decl);
   if (node->local.finalized && cgraph_decide_is_function_needed (node, decl))
     cgraph_mark_needed_node (node);
 }
@@ -667,7 +667,7 @@ verify_cgraph_node (struct cgraph_node *node)
                                     && cgraph_get_node (decl)
                                     && (e->callee->former_clone_of
                                         != cgraph_get_node (decl)->decl)
-                                    && !clone_of_p (cgraph_node (decl),
+                                    && !clone_of_p (cgraph_get_node (decl),
                                                     e->callee))
                              {
                                error ("edge points to wrong declaration:");
@@ -995,10 +995,12 @@ cgraph_analyze_functions (void)
 
       /* If decl is a clone of an abstract function, mark that abstract
         function so that we don't release its body. The DECL_INITIAL() of that
-         abstract function declaration will be later needed to output debug info.  */
+        abstract function declaration will be later needed to output debug
+        info.  */
       if (DECL_ABSTRACT_ORIGIN (decl))
        {
-         struct cgraph_node *origin_node = cgraph_node (DECL_ABSTRACT_ORIGIN (decl));
+         struct cgraph_node *origin_node;
+         origin_node = cgraph_get_node (DECL_ABSTRACT_ORIGIN (decl));
          origin_node->abstract_and_needed = true;
        }
 
@@ -1766,7 +1768,7 @@ cgraph_preserve_function_body_p (tree decl)
 
   gcc_assert (cgraph_global_info_ready);
   /* Look if there is any clone around.  */
-  node = cgraph_node (decl);
+  node = cgraph_get_node (decl);
   if (node->clones)
     return true;
   return false;
@@ -2106,7 +2108,7 @@ save_inline_function_body (struct cgraph_node *node)
 {
   struct cgraph_node *first_clone, *n;
 
-  gcc_assert (node == cgraph_node (node->decl));
+  gcc_assert (node == cgraph_get_node (node->decl));
 
   cgraph_lower_function (node);
 
@@ -2114,7 +2116,7 @@ save_inline_function_body (struct cgraph_node *node)
 
   first_clone->decl = copy_node (node->decl);
   cgraph_insert_node_to_hashtable (first_clone);
-  gcc_assert (first_clone == cgraph_node (first_clone->decl));
+  gcc_assert (first_clone == cgraph_get_node (first_clone->decl));
   if (first_clone->next_sibling_clone)
     {
       for (n = first_clone->next_sibling_clone; n->next_sibling_clone; n = n->next_sibling_clone)
index 490d195a44e70f4b962549c4166efa05fecbe03d..cd47ba75f942738fb967419aa966bf86d4a2bfd6 100644 (file)
@@ -9298,7 +9298,7 @@ ix86_compute_frame_layout (struct ix86_frame *frame)
            && cfun->machine->use_fast_prologue_epilogue_nregs != frame->nregs)
     {
       int count = frame->nregs;
-      struct cgraph_node *node = cgraph_node (current_function_decl);
+      struct cgraph_node *node = cgraph_get_node (current_function_decl);
 
       cfun->machine->use_fast_prologue_epilogue_nregs = count;
 
index 251a5501462a9271e520fb0d38589c3b35713065..5c6359e4c85e67548525ece8fc9882a13c5b54c1 100644 (file)
@@ -1879,11 +1879,11 @@ set_nothrow_function_flags (void)
          }
       }
   if (crtl->nothrow
-      && (cgraph_function_body_availability (cgraph_node
+      && (cgraph_function_body_availability (cgraph_get_node
                                             (current_function_decl))
           >= AVAIL_AVAILABLE))
     {
-      struct cgraph_node *node = cgraph_node (current_function_decl);
+      struct cgraph_node *node = cgraph_get_node (current_function_decl);
       struct cgraph_edge *e;
       for (e = node->callers; e; e = e->next_caller)
         e->can_throw_external = false;
index 17393b7a2b29fbfadb99c16e4a969fac51da8731..d049906cb8b3a2da3c47c9eb993c08d828d55271 100644 (file)
@@ -4356,7 +4356,7 @@ rest_of_clean_state (void)
       else
        {
          const char *aname;
-         struct cgraph_node *node = cgraph_node (current_function_decl);
+         struct cgraph_node *node = cgraph_get_node (current_function_decl);
 
          aname = (IDENTIFIER_POINTER
                   (DECL_ASSEMBLER_NAME (current_function_decl)));
index d654f2fa28de2dffc5743e5445ebafe23ac53d9b..f5a1d26dc276964e413cc92ae3e1ca0cf6f4f643 100644 (file)
@@ -84,7 +84,7 @@ update_call_edge_frequencies (gimple_seq_node first, basic_block bb)
           to avoid calling them if we never see any calls.  */
        if (cfun_node == NULL)
          {
-           cfun_node = cgraph_node (current_function_decl);
+           cfun_node = cgraph_get_node (current_function_decl);
            bb_freq = (compute_call_stmt_bb_frequency
                       (current_function_decl, bb));
          }
index 38d55bc843b78e2c9a12729a9ddc876918d16d18..6f72bfad4fce67c2a81e0223b365c86b573c9fe1 100644 (file)
@@ -1718,7 +1718,7 @@ static GTY ((length ("nnodes"))) struct cgraph_node **order;
 static unsigned int
 cgraph_early_inlining (void)
 {
-  struct cgraph_node *node = cgraph_node (current_function_decl);
+  struct cgraph_node *node = cgraph_get_node (current_function_decl);
   unsigned int todo = 0;
   int iterations = 0;
   bool inlined = false;
@@ -1996,7 +1996,7 @@ compute_inline_parameters (struct cgraph_node *node)
 static unsigned int
 compute_inline_parameters_for_current (void)
 {
-  compute_inline_parameters (cgraph_node (current_function_decl));
+  compute_inline_parameters (cgraph_get_node (current_function_decl));
   return 0;
 }
 
index 0587844e354a8f4756f08231cdf721c6da0f38b3..cc5e8ee11c29826484729bfbbda1c745fb65fcbe 100644 (file)
@@ -1648,7 +1648,7 @@ ipa_make_edge_direct_to_target (struct cgraph_edge *ie, tree target, tree delta)
     target = TREE_OPERAND (target, 0);
   if (TREE_CODE (target) != FUNCTION_DECL)
     return NULL;
-  callee = cgraph_node (target);
+  callee = cgraph_get_node (target);
   if (!callee)
     return NULL;
   ipa_check_create_node_params ();
index 3b4cc02f12c68e2e24b76e0a01169d62e1f8a9af..b7deb5776f4d6c3d09e1497b4f01d52eba66a5d2 100644 (file)
@@ -1563,7 +1563,7 @@ local_pure_const (void)
   bool skip;
   struct cgraph_node *node;
 
-  node = cgraph_node (current_function_decl);
+  node = cgraph_get_node (current_function_decl);
   skip = skip_function_for_local_pure_const (node);
   if (!warn_suggest_attribute_const
       && !warn_suggest_attribute_pure
index 1dde723e3da1bad9034182b39e222a65081e4818..60102db336d777a93f6c4d3c39b121a18721e681 100644 (file)
@@ -1080,7 +1080,7 @@ split_function (struct split_point *split_point)
 
   /* Now create the actual clone.  */
   rebuild_cgraph_edges ();
-  node = cgraph_function_versioning (cgraph_node (current_function_decl),
+  node = cgraph_function_versioning (cgraph_get_node (current_function_decl),
                                     NULL, NULL,
                                     args_to_skip,
                                     split_point->split_bbs,
@@ -1093,7 +1093,7 @@ split_function (struct split_point *split_point)
       DECL_BUILT_IN_CLASS (node->decl) = NOT_BUILT_IN;
       DECL_FUNCTION_CODE (node->decl) = (enum built_in_function) 0;
     }
-  cgraph_node_remove_callees (cgraph_node (current_function_decl));
+  cgraph_node_remove_callees (cgraph_get_node (current_function_decl));
   if (!split_part_return_p)
     TREE_THIS_VOLATILE (node->decl) = 1;
   if (dump_file)
@@ -1265,7 +1265,7 @@ execute_split_functions (void)
   basic_block bb;
   int overall_time = 0, overall_size = 0;
   int todo = 0;
-  struct cgraph_node *node = cgraph_node (current_function_decl);
+  struct cgraph_node *node = cgraph_get_node (current_function_decl);
 
   if (flags_from_decl_or_type (current_function_decl) & ECF_NORETURN)
     {
index 49554083c02097e9ae911e02367a72734ce149e2..24f686e8207ff6b20c060a158753d9ccae49648a 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -1626,7 +1626,7 @@ record_cdtor_fn (struct cgraph_node *node)
     VEC_safe_push (tree, heap, static_ctors, node->decl);
   if (DECL_STATIC_DESTRUCTOR (node->decl))
     VEC_safe_push (tree, heap, static_dtors, node->decl);
-  node = cgraph_node (node->decl);
+  node = cgraph_get_node (node->decl);
   node->local.disregard_inline_limits = 1;
 }
 
index ffe4ff7b846060ad4436af1de07ce6f397530822..62c70d2f8f297fca4d7e33082223c478a762677d 100644 (file)
@@ -1343,7 +1343,7 @@ pass_init_dump_file (struct opt_pass *pass)
       if (dump_file && current_function_decl)
        {
          const char *dname, *aname;
-         struct cgraph_node *node = cgraph_node (current_function_decl);
+         struct cgraph_node *node = cgraph_get_node (current_function_decl);
          dname = lang_hooks.decl_printable_name (current_function_decl, 2);
          aname = (IDENTIFIER_POINTER
                   (DECL_ASSEMBLER_NAME (current_function_decl)));
@@ -1475,7 +1475,7 @@ execute_all_ipa_transforms (void)
   struct cgraph_node *node;
   if (!cfun)
     return;
-  node = cgraph_node (current_function_decl);
+  node = cgraph_get_node (current_function_decl);
 
   if (node->ipa_transforms_to_apply)
     {
@@ -2029,7 +2029,9 @@ bool
 function_called_by_processed_nodes_p (void)
 {
   struct cgraph_edge *e;
-  for (e = cgraph_node (current_function_decl)->callers; e; e = e->next_caller)
+  for (e = cgraph_get_node (current_function_decl)->callers;
+       e;
+       e = e->next_caller)
     {
       if (e->caller->decl == current_function_decl)
         continue;
index dc1104f850e18a27a0e374b75cc1a7727912fdcc..b9a4063073b8d2ac97f05762d5335c8d994b27cf 100644 (file)
@@ -113,7 +113,7 @@ static const struct predictor_info predictor_info[]= {
 static inline bool
 maybe_hot_frequency_p (int freq)
 {
-  struct cgraph_node *node = cgraph_node (current_function_decl);
+  struct cgraph_node *node = cgraph_get_node (current_function_decl);
   if (!profile_info || !flag_branch_probabilities)
     {
       if (node->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED)
@@ -203,7 +203,8 @@ probably_never_executed_bb_p (const_basic_block bb)
   if (profile_info && flag_branch_probabilities)
     return ((bb->count + profile_info->runs / 2) / profile_info->runs) == 0;
   if ((!profile_info || !flag_branch_probabilities)
-      && cgraph_node (current_function_decl)->frequency == NODE_FREQUENCY_UNLIKELY_EXECUTED)
+      && (cgraph_get_node (current_function_decl)->frequency
+         == NODE_FREQUENCY_UNLIKELY_EXECUTED))
     return true;
   return false;
 }
@@ -2225,7 +2226,7 @@ void
 compute_function_frequency (void)
 {
   basic_block bb;
-  struct cgraph_node *node = cgraph_node (current_function_decl);
+  struct cgraph_node *node = cgraph_get_node (current_function_decl);
   if (DECL_STATIC_CONSTRUCTOR (current_function_decl)
       || MAIN_NAME_P (DECL_NAME (current_function_decl)))
     node->only_called_at_startup = true;
index b4f9dcd07e4889e137b141fced282e83104d029c..25d3e26badf194bf09cbcf1fbedcad3588de7ddc 100644 (file)
@@ -1727,7 +1727,7 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
                       && id->transform_call_graph_edges == CB_CGE_MOVE_CLONES))
                  && (fn = gimple_call_fndecl (stmt)) != NULL)
                {
-                 struct cgraph_node *dest = cgraph_node (fn);
+                 struct cgraph_node *dest = cgraph_get_node (fn);
 
                  /* We have missing edge in the callgraph.  This can happen
                     when previous inlining turned an indirect call into a
@@ -4158,7 +4158,7 @@ optimize_inline_calls (tree fn)
   /* Clear out ID.  */
   memset (&id, 0, sizeof (id));
 
-  id.src_node = id.dst_node = cgraph_node (fn);
+  id.src_node = id.dst_node = cgraph_get_node (fn);
   gcc_assert (id.dst_node->analyzed);
   id.dst_fn = fn;
   /* Or any functions that aren't finished yet.  */
index cebaf07f7847c86c8d2fe51bb0e11765fb19f95f..c5ca65baabb0b4839b3fbc44a03d42c570479f7c 100644 (file)
@@ -693,7 +693,7 @@ walk_all_functions (walk_stmt_fn callback_stmt, walk_tree_fn callback_op,
 static bool
 check_for_nested_with_variably_modified (tree fndecl, tree orig_fndecl)
 {
-  struct cgraph_node *cgn = cgraph_node (fndecl);
+  struct cgraph_node *cgn = cgraph_get_node (fndecl);
   tree arg;
 
   for (cgn = cgn->nested; cgn ; cgn = cgn->next_nested)
@@ -2523,13 +2523,13 @@ finalize_nesting_tree (struct nesting_info *root)
 static void
 unnest_nesting_tree_1 (struct nesting_info *root)
 {
-  struct cgraph_node *node = cgraph_node (root->context);
+  struct cgraph_node *node = cgraph_get_node (root->context);
 
   /* For nested functions update the cgraph to reflect unnesting.
      We also delay finalizing of these functions up to this point.  */
   if (node->origin)
     {
-       cgraph_unnest_node (cgraph_node (root->context));
+       cgraph_unnest_node (node);
        cgraph_finalize_function (root->context, true);
     }
 }
@@ -2583,7 +2583,7 @@ lower_nested_functions (tree fndecl)
   struct nesting_info *root;
 
   /* If there are no nested functions, there's nothing to do.  */
-  cgn = cgraph_node (fndecl);
+  cgn = cgraph_get_node (fndecl);
   if (!cgn->nested)
     return;
 
index facbd93a4a24a2751ec29feea19dbd72fce252b3..e277277e7d5ec8e945b5bda88ffbedf7e34f3357 100644 (file)
@@ -247,12 +247,13 @@ execute_fixup_cfg (void)
   edge_iterator ei;
 
   if (ENTRY_BLOCK_PTR->count)
-    count_scale = (cgraph_node (current_function_decl)->count * REG_BR_PROB_BASE
-                  + ENTRY_BLOCK_PTR->count / 2) / ENTRY_BLOCK_PTR->count;
+    count_scale = ((cgraph_get_node (current_function_decl)->count
+                   * REG_BR_PROB_BASE + ENTRY_BLOCK_PTR->count / 2)
+                  / ENTRY_BLOCK_PTR->count);
   else
     count_scale = REG_BR_PROB_BASE;
 
-  ENTRY_BLOCK_PTR->count = cgraph_node (current_function_decl)->count;
+  ENTRY_BLOCK_PTR->count = cgraph_get_node (current_function_decl)->count;
   EXIT_BLOCK_PTR->count = (EXIT_BLOCK_PTR->count * count_scale
                           + REG_BR_PROB_BASE / 2) / REG_BR_PROB_BASE;
 
@@ -457,7 +458,7 @@ tree_rest_of_compilation (tree fndecl)
 
   gimple_set_body (fndecl, NULL);
   if (DECL_STRUCT_FUNCTION (fndecl) == 0
-      && !cgraph_node (fndecl)->origin)
+      && !cgraph_get_node (fndecl)->origin)
     {
       /* Stop pointing to the local nodes about to be freed.
         But DECL_INITIAL must remain nonzero so we know this
index c1c0577c2efd05ca31b0024cfba009f50f39a0f0..9619ae8ee12dd87f5bf60c8e435e518e6f430a05 100644 (file)
@@ -346,7 +346,7 @@ gimple_gen_ic_profiler (histogram_value value, unsigned tag, unsigned base)
 void
 gimple_gen_ic_func_profiler (void)
 {
-  struct cgraph_node * c_node = cgraph_node (current_function_decl);
+  struct cgraph_node * c_node = cgraph_get_node (current_function_decl);
   gimple_stmt_iterator gsi;
   gimple stmt1, stmt2;
   tree tree_uid, cur_func, counter_ptr, ptr_var, void0;
index 7ad0e098721ddb410b2c5d7bf1debd61144f084b..95a9f1b1235faacd1b50a30e224532376162de8d 100644 (file)
@@ -4502,7 +4502,7 @@ ipa_sra_preliminary_function_checks (struct cgraph_node *node)
 static unsigned int
 ipa_early_sra (void)
 {
-  struct cgraph_node *node = cgraph_node (current_function_decl);
+  struct cgraph_node *node = cgraph_get_node (current_function_decl);
   ipa_parm_adjustment_vec adjustments;
   int ret = 0;
 
index 479b46fb8dcd450963f3fabcc7f723814bf78667..0aa21e0c9f3488e6ec2c095463d79dcb11c984dd 100644 (file)
@@ -2849,7 +2849,7 @@ computation_cost (tree expr, bool speed)
   unsigned cost;
   /* Avoid using hard regs in ways which may be unsupported.  */
   int regno = LAST_VIRTUAL_REGISTER + 1;
-  struct cgraph_node *node = cgraph_node (current_function_decl);
+  struct cgraph_node *node = cgraph_get_node (current_function_decl);
   enum node_frequency real_frequency = node->frequency;
 
   node->frequency = NODE_FREQUENCY_NORMAL;