summaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2020-10-31 10:18:06 +0100
committerJan Hubicka <jh@suse.cz>2020-10-31 10:18:06 +0100
commitae7a23a3fab74ebd45203d48fa09681c9945ee7a (patch)
treedd288d22c32cd5f609204c5a62c74dd025194459 /gcc/cgraph.h
parent617695cdc2b3d950f1e4deb5ea85d5cc302943f4 (diff)
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/cgraph.h')
-rw-r--r--gcc/cgraph.h35
1 files changed, 11 insertions, 24 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index fb3ad95e064..cf543705e13 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -691,27 +691,6 @@ struct GTY(()) ipa_replace_map
int parm_num;
};
-struct GTY(()) cgraph_clone_info
-{
- /* Constants discovered by IPA-CP, i.e. which parameter should be replaced
- with what. */
- vec<ipa_replace_map *, va_gc> *tree_map;
- /* Parameter modification that IPA-SRA decided to perform. */
- ipa_param_adjustments *param_adjustments;
- /* Lists of dummy-decl and offset pairs representing split formal parameters
- in the caller. Offsets of all new replacements are enumerated, those
- coming from the same original parameter have the same dummy decl stored
- along with them.
-
- Dummy decls sit in call statement arguments followed by new parameter
- decls (or their SSA names) in between (caller) clone materialization and
- call redirection. Redirection then recognizes the dummy variable and
- together with the stored offsets can reconstruct what exactly the new
- parameter decls represent and can leave in place only those that the
- callee expects. */
- vec<ipa_param_performed_split, va_gc> *performed_splits;
-};
-
enum cgraph_simd_clone_arg_type
{
SIMD_CLONE_ARG_TYPE_VECTOR,
@@ -879,7 +858,7 @@ struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node
next_sibling_clone (NULL), prev_sibling_clone (NULL), clones (NULL),
clone_of (NULL), call_site_hash (NULL), former_clone_of (NULL),
simdclone (NULL), simd_clones (NULL), ipa_transforms_to_apply (vNULL),
- inlined_to (NULL), rtl (NULL), clone (),
+ inlined_to (NULL), rtl (NULL),
count (profile_count::uninitialized ()),
count_materialization_scale (REG_BR_PROB_BASE), profile_id (0),
unit_id (0), tp_first_run (0), thunk (false),
@@ -1409,7 +1388,6 @@ struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node
cgraph_node *inlined_to;
struct cgraph_rtl_info *rtl;
- cgraph_clone_info clone;
/* Expected number of executions: calculated in profile.c. */
profile_count count;
@@ -2190,10 +2168,16 @@ struct asmname_hasher : ggc_ptr_hash <symtab_node>
static bool equal (symtab_node *n, const_tree t);
};
+/* Core summaries maintained about symbols. */
+
struct thunk_info;
template <class T> class function_summary;
typedef function_summary <thunk_info *> thunk_summary;
+struct clone_info;
+template <class T> class function_summary;
+typedef function_summary <clone_info *> clone_summary;
+
class GTY((tag ("SYMTAB"))) symbol_table
{
public:
@@ -2210,7 +2194,7 @@ public:
function_flags_ready (false), cpp_implicit_aliases_done (false),
section_hash (NULL), assembler_name_hash (NULL), init_priority_hash (NULL),
dump_file (NULL), ipa_clones_dump_file (NULL), cloned_nodes (),
- m_thunks (NULL),
+ m_thunks (NULL), m_clones (NULL),
m_first_edge_removal_hook (NULL), m_first_cgraph_removal_hook (NULL),
m_first_edge_duplicated_hook (NULL), m_first_cgraph_duplicated_hook (NULL),
m_first_cgraph_insertion_hook (NULL), m_first_varpool_insertion_hook (NULL),
@@ -2495,6 +2479,9 @@ public:
/* Thunk annotations. */
thunk_summary *m_thunks;
+ /* Virtual clone annotations. */
+ clone_summary *m_clones;
+
private:
/* Allocate a cgraph_edge structure and fill it with data according to the
parameters of which only CALLEE can be NULL (when creating an indirect