diff options
author | Jan Hubicka <jh@suse.cz> | 2020-10-31 10:18:06 +0100 |
---|---|---|
committer | Jan Hubicka <jh@suse.cz> | 2020-10-31 10:18:06 +0100 |
commit | ae7a23a3fab74ebd45203d48fa09681c9945ee7a (patch) | |
tree | dd288d22c32cd5f609204c5a62c74dd025194459 /gcc/ipa-cp.c | |
parent | 617695cdc2b3d950f1e4deb5ea85d5cc302943f4 (diff) | |
download | gcc-ae7a23a3fab74ebd45203d48fa09681c9945ee7a.zip gcc-ae7a23a3fab74ebd45203d48fa09681c9945ee7a.tar.gz gcc-ae7a23a3fab74ebd45203d48fa09681c9945ee7a.tar.bz2 |
Move clone_info to summary
* Makefile.in: (OBJS): Add symtab-clones.o
(GTFILES): Add symtab-clones.h
* cgraph.c: Include symtab-clones.h.
(cgraph_edge::resolve_speculation): Fix formating
(cgraph_edge::redirect_call_stmt_to_callee): Update.
(cgraph_update_edges_for_call_stmt): Update
(release_function_body): Fix formating.
(cgraph_node::remove): Fix formating.
(cgraph_node::dump): Fix formating.
(cgraph_node::get_availability): Fix formating.
(cgraph_node::call_for_symbol_thunks_and_aliases): Fix formating.
(set_const_flag_1): Fix formating.
(set_pure_flag_1): Fix formating.
(cgraph_node::can_remove_if_no_direct_calls_p): Fix formating.
(collect_callers_of_node_1): Fix formating.
(clone_of_p): Update.
(cgraph_node::verify_node): Update.
(cgraph_c_finalize): Call clone_info::release ().
* cgraph.h (struct cgraph_clone_info): Move to symtab-clones.h.
(cgraph_node): Remove clone_info.
(symbol_table): Add m_clones.
* cgraphclones.c: Include symtab-clone.h.
(duplicate_thunk_for_node): Update.
(cgraph_node::create_clone): Update.
(cgraph_node::create_virtual_clone): Update.
(cgraph_node::find_replacement): Update.
(cgraph_node::materialize_clone): Update.
* gengtype.c (open_base_files): Include symtab-clones.h.
* ipa-cp.c: Include symtab-clones.h.
(initialize_node_lattices): Update.
(want_remove_some_param_p): Update.
(create_specialized_node): Update.
* ipa-fnsummary.c: Include symtab-clones.h.
(ipa_fn_summary_t::duplicate): Update.
* ipa-modref.c: Include symtab-clones.h.
(update_signature): Update.
* ipa-param-manipulation.c: Include symtab-clones.h.
(ipa_param_body_adjustments::common_initialization): Update.
* ipa-prop.c: Include symtab-clones.h.
(adjust_agg_replacement_values): Update.
(ipcp_get_parm_bits): Update.
(ipcp_update_bits): Update.
(ipcp_update_vr): Update.
* ipa-sra.c: Include symtab-clones.h.
(process_isra_node_results): Update.
(disable_unavailable_parameters): Update.
* lto-cgraph.c: Include symtab-clone.h.
(output_cgraph_opt_summary_p): Update.
(output_node_opt_summary): Update.
(input_node_opt_summary): Update.
* symtab-clones.cc: New file.
* symtab-clones.h: New file.
* tree-inline.c (expand_call_inline): Update.
(update_clone_info): Update.
(tree_function_versioning): Update.
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r-- | gcc/ipa-cp.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 028480f..1405156 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -124,6 +124,7 @@ along with GCC; see the file COPYING3. If not see #include "stringpool.h" #include "attribs.h" #include "dbgcnt.h" +#include "symtab-clones.h" template <typename valtype> class ipcp_value; @@ -1226,18 +1227,21 @@ initialize_node_lattices (struct cgraph_node *node) auto_vec<bool, 16> surviving_params; bool pre_modified = false; - if (!disable && node->clone.param_adjustments) + + clone_info *cinfo = clone_info::get (node); + + if (!disable && cinfo && cinfo->param_adjustments) { /* At the moment all IPA optimizations should use the number of parameters of the prevailing decl as the m_always_copy_start. Handling any other value would complicate the code below, so for the time bing let's only assert it is so. */ - gcc_assert ((node->clone.param_adjustments->m_always_copy_start + gcc_assert ((cinfo->param_adjustments->m_always_copy_start == ipa_get_param_count (info)) - || node->clone.param_adjustments->m_always_copy_start < 0); + || cinfo->param_adjustments->m_always_copy_start < 0); pre_modified = true; - node->clone.param_adjustments->get_surviving_params (&surviving_params); + cinfo->param_adjustments->get_surviving_params (&surviving_params); if (dump_file && (dump_flags & TDF_DETAILS) && !node->alias && !node->thunk) @@ -4456,9 +4460,10 @@ want_remove_some_param_p (cgraph_node *node, vec<tree> known_csts) if (!filled_vec) { - if (!node->clone.param_adjustments) + clone_info *info = clone_info::get (node); + if (!info || !info->param_adjustments) return true; - node->clone.param_adjustments->get_surviving_params (&surviving); + info->param_adjustments->get_surviving_params (&surviving); filled_vec = true; } if (surviving.length() < (unsigned) i && surviving[i]) @@ -4484,7 +4489,9 @@ create_specialized_node (struct cgraph_node *node, struct ipa_agg_replacement_value *av; struct cgraph_node *new_node; int i, count = ipa_get_param_count (info); - ipa_param_adjustments *old_adjustments = node->clone.param_adjustments; + clone_info *cinfo = clone_info::get (node); + ipa_param_adjustments *old_adjustments = cinfo + ? cinfo->param_adjustments : NULL; ipa_param_adjustments *new_adjustments; gcc_assert (!info->ipcp_orig_node); gcc_assert (node->can_change_signature @@ -4538,7 +4545,7 @@ create_specialized_node (struct cgraph_node *node, else new_adjustments = NULL; - replace_trees = vec_safe_copy (node->clone.tree_map); + replace_trees = cinfo ? vec_safe_copy (cinfo->tree_map) : NULL; for (i = 0; i < count; i++) { tree t = known_csts[i]; |