diff options
author | Martin Liska <mliska@suse.cz> | 2018-06-08 14:11:48 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2018-06-08 12:11:48 +0000 |
commit | 99353fcfe4f50d131fae9978ce9cd19bcaf243cf (patch) | |
tree | fbbefc6f259347afb53703958f7a24081975a0cd /gcc/ipa-inline-analysis.c | |
parent | 2a281178f70c38d796c8ec77e049f8139e1110fc (diff) | |
download | gcc-99353fcfe4f50d131fae9978ce9cd19bcaf243cf.zip gcc-99353fcfe4f50d131fae9978ce9cd19bcaf243cf.tar.gz gcc-99353fcfe4f50d131fae9978ce9cd19bcaf243cf.tar.bz2 |
Rename get methods in symbol-summary.h to get_create.
2018-06-08 Martin Liska <mliska@suse.cz>
* config/i386/i386.c (ix86_can_inline_p): Use get_create instead
of get.
* hsa-common.c (hsa_summary_t::link_functions): Likewise.
(hsa_register_kernel): Likewise.
* hsa-common.h (hsa_gpu_implementation_p): Likewise.
* hsa-gen.c (hsa_get_host_function): Likewise.
(get_brig_function_name): Likewise.
(generate_hsa): Likewise.
(pass_gen_hsail::execute): Likewise.
* ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
(devirtualization_time_bonus): Likewise.
(ipcp_propagate_stage): Likewise.
* ipa-fnsummary.c (redirect_to_unreachable): Likewise.
(edge_set_predicate): Likewise.
(evaluate_conditions_for_known_args): Likewise.
(evaluate_properties_for_edge): Likewise.
(ipa_fn_summary::reset): Likewise.
(ipa_fn_summary_t::duplicate): Likewise.
(dump_ipa_call_summary): Likewise.
(ipa_dump_fn_summary): Likewise.
(analyze_function_body): Likewise.
(compute_fn_summary): Likewise.
(estimate_edge_devirt_benefit): Likewise.
(estimate_edge_size_and_time): Likewise.
(estimate_calls_size_and_time): Likewise.
(estimate_node_size_and_time): Likewise.
(inline_update_callee_summaries): Likewise.
(remap_edge_change_prob): Likewise.
(remap_edge_summaries): Likewise.
(ipa_merge_fn_summary_after_inlining): Likewise.
(ipa_update_overall_fn_summary): Likewise.
(read_ipa_call_summary): Likewise.
(inline_read_section): Likewise.
(write_ipa_call_summary): Likewise.
(ipa_fn_summary_write): Likewise.
(ipa_free_fn_summary): Likewise.
* ipa-hsa.c (process_hsa_functions): Likewise.
(ipa_hsa_write_summary): Likewise.
(ipa_hsa_read_section): Likewise.
* ipa-icf.c (sem_function::merge): Likewise.
* ipa-inline-analysis.c (simple_edge_hints): Likewise.
(do_estimate_edge_time): Likewise.
(estimate_size_after_inlining): Likewise.
(estimate_growth): Likewise.
(growth_likely_positive): Likewise.
* ipa-inline-transform.c (clone_inlined_nodes): Likewise.
(inline_call): Likewise.
* ipa-inline.c (caller_growth_limits): Likewise.
(can_inline_edge_p): Likewise.
(can_inline_edge_by_limits_p): Likewise.
(compute_uninlined_call_time): Likewise.
(compute_inlined_call_time): Likewise.
(want_inline_small_function_p): Likewise.
(edge_badness): Likewise.
(update_caller_keys): Likewise.
(update_callee_keys): Likewise.
(recursive_inlining): Likewise.
(inline_small_functions): Likewise.
(inline_to_all_callers_1): Likewise.
(dump_overall_stats): Likewise.
(early_inline_small_functions): Likewise.
(early_inliner): Likewise.
* ipa-inline.h (estimate_edge_growth): Likewise.
* ipa-profile.c (ipa_propagate_frequency_1): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
* ipa-prop.h (IPA_NODE_REF): Likewise.
(IPA_EDGE_REF): Likewise.
* ipa-pure-const.c (malloc_candidate_p): Likewise.
(propagate_malloc): Likewise.
* ipa-split.c (execute_split_functions): Likewise.
* symbol-summary.h: Rename get to get_create.
(get): Likewise.
(get_create): Likewise.
* tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* lto-partition.c (add_symbol_to_partition_1): Use get_create instead
of get.
(undo_partition): Likewise.
(lto_balanced_map): Likewise.
From-SVN: r261309
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index bcdca5b..c4f9047 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -125,9 +125,9 @@ 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 (to)->scc_no - && ipa_fn_summaries->get (to)->scc_no - == ipa_fn_summaries->get (callee)->scc_no + if (ipa_fn_summaries->get_create (to)->scc_no + && ipa_fn_summaries->get_create (to)->scc_no + == ipa_fn_summaries->get_create (callee)->scc_no && !edge->recursive_p ()) hints |= INLINE_HINT_same_scc; @@ -157,7 +157,7 @@ do_estimate_edge_time (struct cgraph_edge *edge) vec<tree> known_vals; vec<ipa_polymorphic_call_context> known_contexts; vec<ipa_agg_jump_function_p> known_aggs; - struct ipa_call_summary *es = ipa_call_summaries->get (edge); + struct ipa_call_summary *es = ipa_call_summaries->get_create (edge); int min_size; callee = edge->callee->ultimate_alias_target (); @@ -190,7 +190,7 @@ do_estimate_edge_time (struct cgraph_edge *edge) /* When caching, update the cache entry. */ if (edge_growth_cache.exists ()) { - ipa_fn_summaries->get (edge->callee)->min_size = min_size; + ipa_fn_summaries->get_create (edge->callee)->min_size = min_size; if ((int) edge_growth_cache.length () <= edge->uid) edge_growth_cache.safe_grow_cleared (symtab->edges_max_uid); edge_growth_cache[edge->uid].time = time; @@ -293,14 +293,15 @@ int estimate_size_after_inlining (struct cgraph_node *node, struct cgraph_edge *edge) { - struct ipa_call_summary *es = ipa_call_summaries->get (edge); + struct ipa_call_summary *es = ipa_call_summaries->get_create (edge); + ipa_fn_summary *s = ipa_fn_summaries->get_create (node); if (!es->predicate || *es->predicate != false) { - int size = ipa_fn_summaries->get (node)->size + estimate_edge_growth (edge); + int size = s->size + estimate_edge_growth (edge); gcc_assert (size >= 0); return size; } - return ipa_fn_summaries->get (node)->size; + return s->size; } @@ -349,7 +350,7 @@ int estimate_growth (struct cgraph_node *node) { struct growth_data d = { node, false, false, 0 }; - struct ipa_fn_summary *info = ipa_fn_summaries->get (node); + struct ipa_fn_summary *info = ipa_fn_summaries->get_create (node); node->call_for_symbol_and_aliases (do_estimate_growth_1, &d, true); @@ -424,7 +425,7 @@ growth_likely_positive (struct cgraph_node *node, || node->address_taken) return true; - max_callers = ipa_fn_summaries->get (node)->size * 4 / edge_growth + 2; + max_callers = ipa_fn_summaries->get_create (node)->size * 4 / edge_growth + 2; for (e = node->callers; e; e = e->next_caller) { |