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 27d1b7c12227e104e2d12e9323d93e88f2d324a5..38ffb41c649e193b67bdff244998ba551f821281 100644 (file)
@@ -1,3 +1,8 @@
+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
index 9a7267395ea78c3e5fe349557ff76e0511590eb5..c781d368a8a5d57950e71d4374d677c50af17244 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 15825bca820f39273d2190f4f45a9286bb3a959f..02d6da06f6d9e1bb1fcfaaabd372da419495115b 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);
 }