From 6f86434f0a5be26766c093742b1239f281bc0e9a Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 8 Jun 2018 14:37:03 +0200 Subject: [PATCH] Replace some ::get_create with ::get in IPA inline. 2018-06-08 Martin Liska * ipa-inline-analysis.c (simple_edge_hints): Use ::get method. * ipa-inline.h (estimate_edge_growth): Likewise. From-SVN: r261321 --- gcc/ChangeLog | 5 +++++ gcc/ipa-inline-analysis.c | 8 ++++---- gcc/ipa-inline.h | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 27d1b7c1222..38ffb41c649 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-06-08 Martin Liska + + * ipa-inline-analysis.c (simple_edge_hints): Use ::get method. + * ipa-inline.h (estimate_edge_growth): Likewise. + 2018-06-08 Martin Liska * cgraph.c (function_version_hasher::hash): Use diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 9a7267395ea..c781d368a8a 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -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 diff --git a/gcc/ipa-inline.h b/gcc/ipa-inline.h index 15825bca820..02d6da06f6d 100644 --- a/gcc/ipa-inline.h +++ b/gcc/ipa-inline.h @@ -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); } -- 2.30.2