Replace some ::get_create with ::get in IPA inline.
authorMartin Liska <mliska@suse.cz>
Fri, 8 Jun 2018 12:37:03 +0000 (14:37 +0200)
committerMartin Liska <marxin@gcc.gnu.org>
Fri, 8 Jun 2018 12:37:03 +0000 (12:37 +0000)
2018-06-08  Martin Liska  <mliska@suse.cz>

* ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
* ipa-inline.h (estimate_edge_growth): Likewise.

From-SVN: r261321

gcc/ChangeLog
gcc/ipa-inline-analysis.c
gcc/ipa-inline.h

index 27d1b7c..38ffb41 100644 (file)
@@ -1,5 +1,10 @@
 2018-06-08  Martin Liska  <mliska@suse.cz>
 
+       * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
+       * ipa-inline.h (estimate_edge_growth): Likewise.
+
+2018-06-08  Martin Liska  <mliska@suse.cz>
+
        * cgraph.c (function_version_hasher::hash): Use
        cgraph_node::get_uid ().
        (function_version_hasher::equal):
index 9a72673..c781d36 100644 (file)
@@ -96,10 +96,10 @@ simple_edge_hints (struct cgraph_edge *edge)
   struct cgraph_node *to = (edge->caller->global.inlined_to
                            ? edge->caller->global.inlined_to : edge->caller);
   struct cgraph_node *callee = edge->callee->ultimate_alias_target ();
-  if (ipa_fn_summaries->get_create (to)->scc_no
-      && ipa_fn_summaries->get (to)->scc_no
-        == ipa_fn_summaries->get_create (callee)->scc_no
-      && !edge->recursive_p ())
+  int to_scc_no = ipa_fn_summaries->get (to)->scc_no;
+  int callee_scc_no = ipa_fn_summaries->get (callee)->scc_no;
+
+  if (to_scc_no && to_scc_no  == callee_scc_no && !edge->recursive_p ())
     hints |= INLINE_HINT_same_scc;
 
   if (callee->lto_file_data && edge->caller->lto_file_data
index 15825bc..02d6da0 100644 (file)
@@ -81,7 +81,7 @@ estimate_edge_size (struct cgraph_edge *edge)
 static inline int
 estimate_edge_growth (struct cgraph_edge *edge)
 {
-  ipa_call_summary *s = ipa_call_summaries->get_create (edge);
+  ipa_call_summary *s = ipa_call_summaries->get (edge);
   gcc_checking_assert (s->call_stmt_size || !edge->callee->analyzed);
   return (estimate_edge_size (edge) - s->call_stmt_size);
 }