diff options
author | Martin Liska <mliska@suse.cz> | 2014-08-25 15:01:47 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2014-08-25 13:01:47 +0000 |
commit | 3dafb85c8e6ade82adc591fe97c116b193f8bb0d (patch) | |
tree | 6efa3ef534f8ca5761c35200d5cc61a819dde6f4 /gcc/config | |
parent | 3749134042ab5f54d0c30af1ec336e7132ac9bc8 (diff) | |
download | gcc-3dafb85c8e6ade82adc591fe97c116b193f8bb0d.zip gcc-3dafb85c8e6ade82adc591fe97c116b193f8bb0d.tar.gz gcc-3dafb85c8e6ade82adc591fe97c116b193f8bb0d.tar.bz2 |
IPA C++ refactoring 4/N
* cgraph.h (symtab_node):
(bool needed_p (void)): created from decide_is_symbol_needed
(bool referred_to_p (void)): created from referred_to_p
(static cgraph_node *get_for_asmname (tree asmname)): created from symtab_node_for_asm
* cgraph.h (cgraph_node):
(void assemble_thunks_and_aliases (void)): created from assemble_thunks_and_aliases
(void expand (void)): created from expand_function
(static void finalize_function (tree, bool)): created from cgraph_finalize_function
(static cgraph_local_info *local_info (tree decl)): created from cgraph_local_info
(static cgraph_global_info *global_info (tree)): created from cgraph_global_info
(static cgraph_rtl_info *rtl_info (tree)): created from cgraph_rtl_info
* cgraph.h (varpool_node):
(static void add (tree decl): created from varpool_add_new_variable
* cgraph.h (cgraph_edge):
void remove (void);
(void remove_caller (void)): created from cgraph_edge_remove_caller
(void remove_callee (void)): created from cgraph_edge_remove_callee
(void set_call_stmt (gimple new_stmt, bool update_speculative = true)):
created from cgraph_set_call_stmt
(void redirect_callee (cgraph_node *n)): created from cgraph_redirect_edge_callee
(cgraph_edge *make_direct (cgraph_node *callee)): created from cgraph_make_edge_direct
(cgraph_edge *make_speculative (cgraph_node *n2, gcov_type direct_count,
gimple redirect_call_stmt_to_callee (void)): created from cgraph_turn_edge_to_speculative
(void speculative_call_info (cgraph_edge *&direct, cgraph_edge *&indirect, ipa_ref *&reference)):
created from cgraph_speculative_call_info
(cgraph_edge * clone (cgraph_node *n, gimple call_stmt, unsigned stmt_uid, gcov_type count_scale,
int freq_scale, bool update_original)): created from cgraph_clone_edge
(cgraph_edge *resolve_speculation (tree callee_decl)): created from cgraph_resolve_speculation
(bool cannot_lead_to_return_p (void)): created from cannot_lead_to_return_p
(bool recursive_p (void)): created from cgraph_edge_recursive_p
(bool maybe_hot_p (void)): created from cgraph_maybe_hot_edge_p
(static unsigned int rebuild_edges (void)): created from rebuild_cgraph_edges
(static void rebuild_references (void)): created from cgraph_rebuild_references
* cgraph.h (symbol_table):
(create_reference): renamed from add_reference
(maybe_create_reference): renamed from maybe_add_reference
(void register_symbol (symtab_node *node)): new function
(void clear_asm_symbols (void)): new function
(void unregister (symtab_node *node)): new function
(void release_symbol (cgraph_node *node, int uid)): new function
(cgraph_node * allocate_cgraph_symbol (void)): new function
(void initialize (void)): created from cgraph_init
(symtab_node *first_symbol (void)):new function
(asm_node *first_asm_symbol (void)):new function
(symtab_node *first_defined_symbol (void)):new function
(varpool_node *first_variable (void)):new function
(varpool_node *next_variable (varpool_node *node)):new function
(varpool_node *first_static_initializer (void)):new function
(varpool_node *next_static_initializer (varpool_node *node)):new function
(varpool_node *first_defined_variable (void)):new function
(varpool_node *next_defined_variable (varpool_node *node)):new function
(cgraph_node *first_defined_function (void)):new function
(cgraph_node *next_defined_function (cgraph_node *node)):new function
(cgraph_node *first_function (void)):new function
(cgraph_node *next_function (cgraph_node *node)):new function
(cgraph_node *first_function_with_gimple_body (void)):new function
(asm_node *finalize_toplevel_asm (tree asm_str)): created from add_asm_node
(bool remove_unreachable_nodes (bool before_inlining_p, FILE *file)):
created from symtab_remove_unreachable_nodes
(void remove_unreferenced_decls (void)): created from varpool_remove_unreferenced_decls
(void process_new_functions (void)): created from cgraph_process_new_functions
(void process_same_body_aliases (void)): created from cgraph_process_same_body_aliases
(bool output_variables (void)): created from varpool_node::output_variables
(void output_asm_statements (void)): created from output_asm_statements
(void finalize_compilation_unit (void)): created from finalize_compilation_unit
(void compile (void)): created from compile
(void output_weakrefs (void)): created from output_weakrefs
(cgraph_node *create_empty (void)): created from cgraph_node::create_empty
(cgraph_edge *create_edge (cgraph_node *caller, cgraph_node *callee, gimple call_stmt,
gcov_type count, int freq, bool indir_unknown_callee)): created from cgraph_node::create_edge
(void free_edge (cgraph_edge *e)): created from cgraph_free_edge
(cgraph_node *next_function_with_gimple_body (cgraph_node *node)):
created from cgraph_next_function_with_gimple_body
(void remove_edge_removal_hook (cgraph_edge_hook_list *)):
created from cgraph_remove_edge_removal_hook
(cgraph_node_hook_list *add_cgraph_removal_hook (cgraph_node_hook, void *)):
created from cgraph_add_node_removal_hook
(void remove_cgraph_removal_hook (cgraph_node_hook_list *)):
created from cgraph_remove_node_removal_hook
(varpool_node_hook_list *add_varpool_removal_hook (varpool_node_hook, void *)):
created from varpool_add_node_removal_hook
(void remove_varpool_removal_hook (varpool_node_hook_list *)):
created from varpool_remove_node_removal_hook
(cgraph_node_hook_list *add_cgraph_insertion_hook (cgraph_node_hook, void *)):
created from cgraph_add_function_insertion_hook
(void remove_cgraph_insertion_hook (cgraph_node_hook_list *)):
created from cgraph_remove_function_insertion_hook
(varpool_node_hook_list *add_varpool_insertion_hook (varpool_node_hook, void *)):
created from varpool_add_variable_insertion_hook
(void remove_varpool_insertion_hook (varpool_node_hook_list *)):
created from varpool_remove_variable_insertion_hook
(cgraph_2edge_hook_list *add_edge_duplication_hook (cgraph_2edge_hook, void *)):
created from cgraph_add_edge_duplication_hook
(void remove_edge_duplication_hook (cgraph_2edge_hook_list *)):
created from cgraph_remove_edge_duplication_hook
(cgraph_2node_hook_list *add_cgraph_duplication_hook (cgraph_2node_hook, void *)):
created from cgraph_add_node_duplication_hook
(void remove_cgraph_duplication_hook (cgraph_2node_hook_list *)):
created from cgraph_remove_node_duplication_hook
(void call_edge_removal_hooks (cgraph_edge *e)):
created from cgraph_call_edge_removal_hooks
(void call_cgraph_insertion_hooks (cgraph_node *node)):
created from call_function_insertion_hooks
(void call_cgraph_removal_hooks (cgraph_node *node)):
created from cgraph_call_node_removal_hooks
(void call_cgraph_duplication_hooks (cgraph_node *node, cgraph_node *node2)):
created from cgraph_node::call_duplication_hooks
(void call_edge_duplication_hooks (cgraph_edge *cs1, cgraph_edge *cs2)):
created from cgraph_call_edge_duplication_hooks
(void call_varpool_removal_hooks (varpool_node *node)):
created from varpool_call_node_removal_hooks
(void call_varpool_insertion_hooks (varpool_node *node)):
created from varpool_call_variable_insertion_hooks
(void insert_to_assembler_name_hash (symtab_node *node, bool with_clones)):
created from insert_to_assembler_name_hash
(void unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)):
created from unlink_from_assembler_name_hash
(void symtab_prevail_in_asm_name_hash (symtab_node *node)):
created from symtab_prevail_in_asm_name_hash
(void symtab_initialize_asm_name_hash (void)):
created from symtab_initialize_asm_name_hash
(void change_decl_assembler_name (tree decl, tree name)):
created from change_decl_assembler_name
(void materialize_all_clones (void)): created from cgraph_materialize_all_clones
(static hashval_t decl_assembler_name_hash (const_tree asmname)):
created from decl_assembler_name_hash
(static bool decl_assembler_name_equal (tree decl, const_tree asmname)):
created from decl_assembler_name_equal
(static hashval_t hash_node_by_assembler_name (const void *p)):
created from hash_node_by_assembler_name
(static int eq_assembler_name (const void *p1, const void *p2)):
created from eq_assembler_name
From-SVN: r214422
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/arm/arm.c | 2 | ||||
-rw-r--r-- | gcc/config/bfin/bfin.c | 6 | ||||
-rw-r--r-- | gcc/config/c6x/c6x.c | 4 | ||||
-rw-r--r-- | gcc/config/cris/cris.c | 2 | ||||
-rw-r--r-- | gcc/config/cris/cris.h | 2 | ||||
-rw-r--r-- | gcc/config/darwin-c.c | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 12 | ||||
-rw-r--r-- | gcc/config/microblaze/microblaze.c | 4 |
8 files changed, 19 insertions, 19 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 858f0d7..7a82a9b 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -5135,7 +5135,7 @@ arm_get_pcs_model (const_tree type, const_tree decl) so we are free to use whatever conventions are appropriate. */ /* FIXME: remove CONST_CAST_TREE when cgraph is constified. */ - struct cgraph_local_info *i = cgraph_local_info (CONST_CAST_TREE(decl)); + cgraph_local_info *i = cgraph_node::local_info (CONST_CAST_TREE(decl)); if (i && i->local) return ARM_PCS_AAPCS_LOCAL; } diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 07edad2..59456a8 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -1045,7 +1045,7 @@ bfin_load_pic_reg (rtx dest) struct cgraph_local_info *i = NULL; rtx addr; - i = cgraph_local_info (current_function_decl); + i = cgraph_node::local_info (current_function_decl); /* Functions local to the translation unit don't need to reload the pic reg, since the caller always passes a usable one. */ @@ -1839,8 +1839,8 @@ bfin_function_ok_for_sibcall (tree decl ATTRIBUTE_UNUSED, /* Not enough information. */ return false; - this_func = cgraph_local_info (current_function_decl); - called_func = cgraph_local_info (decl); + this_func = cgraph_node::local_info (current_function_decl); + called_func = cgraph_node::local_info (decl); if (!called_func) return false; return !called_func->local || this_func->local; diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c index 9998734..aaea6c0 100644 --- a/gcc/config/c6x/c6x.c +++ b/gcc/config/c6x/c6x.c @@ -1177,7 +1177,7 @@ c6x_function_ok_for_sibcall (tree decl, tree exp) /* Not enough information. */ return false; - this_func = cgraph_local_info (current_function_decl); + this_func = cgraph_node::local_info (current_function_decl); return this_func->local; } @@ -2540,7 +2540,7 @@ must_reload_pic_reg_p (void) if (!TARGET_DSBT) return false; - i = cgraph_local_info (current_function_decl); + i = cgraph_node::local_info (current_function_decl); if ((crtl->uses_pic_offset_table || !crtl->is_leaf) && !i->local) return true; diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 787c3fc..cef1198 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -2578,7 +2578,7 @@ cris_legitimate_pic_operand (rtx x) void cris_asm_output_ident (const char *string) { - if (cgraph_state != CGRAPH_STATE_PARSING) + if (symtab->state != PARSING) return; default_asm_output_ident_directive (string); diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h index c5aa83e..12b1ea8 100644 --- a/gcc/config/cris/cris.h +++ b/gcc/config/cris/cris.h @@ -859,7 +859,7 @@ enum cris_symbol_type /* We don't want an .ident for gcc. To avoid that but still support #ident, we override TARGET_ASM_OUTPUT_IDENT and, since the gcc .ident is its only use besides front-end .ident directives, we return if - the state if the cgraph is not CGRAPH_STATE_PARSING. */ + the state if the cgraph is not PARSING. */ #undef TARGET_ASM_OUTPUT_IDENT #define TARGET_ASM_OUTPUT_IDENT cris_asm_output_ident diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index 892ba35..9e876cf 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -731,7 +731,7 @@ darwin_objc_declare_unresolved_class_reference (const char *name) gcc_checking_assert (!strncmp (name, ".objc_class_name_", 17)); snprintf (buf, len, "%s%s", reference, name); - add_asm_node (build_string (strlen (buf), buf)); + symtab->finalize_toplevel_asm (build_string (strlen (buf), buf)); } static void @@ -746,10 +746,10 @@ darwin_objc_declare_class_definition (const char *name) /* Mimic default_globalize_label. */ snprintf (buf, len, ".globl\t%s", xname); - add_asm_node (build_string (strlen (buf), buf)); + symtab->finalize_toplevel_asm (build_string (strlen (buf), buf)); snprintf (buf, len, "%s = 0", xname); - add_asm_node (build_string (strlen (buf), buf)); + symtab->finalize_toplevel_asm (build_string (strlen (buf), buf)); } #undef TARGET_HANDLE_C_OPTION diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 3e4c93e..796ba72 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -5664,7 +5664,7 @@ ix86_function_regparm (const_tree type, const_tree decl) && !(profile_flag && !flag_fentry)) { /* FIXME: remove this CONST_CAST when cgraph.[ch] is constified. */ - struct cgraph_local_info *i = cgraph_local_info (CONST_CAST_TREE (decl)); + cgraph_local_info *i = cgraph_node::local_info (CONST_CAST_TREE (decl)); if (i && i->local && i->can_change_signature) { int local_regparm, globals = 0, regno; @@ -5741,7 +5741,7 @@ ix86_function_sseregparm (const_tree type, const_tree decl, bool warn) && !(profile_flag && !flag_fentry)) { /* FIXME: remove this CONST_CAST when cgraph.[ch] is constified. */ - struct cgraph_local_info *i = cgraph_local_info (CONST_CAST_TREE(decl)); + cgraph_local_info *i = cgraph_node::local_info (CONST_CAST_TREE(decl)); if (i && i->local && i->can_change_signature) return TARGET_SSE2 ? 2 : 1; } @@ -6150,7 +6150,7 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */ if (fndecl) { - i = cgraph_local_info (fndecl); + i = cgraph_node::local_info (fndecl); cum->call_abi = ix86_function_abi (fndecl); } else @@ -32231,7 +32231,7 @@ make_resolver_func (const tree default_decl, *empty_bb = init_lowered_empty_function (decl, false); cgraph_node::add_new_function (decl, true); - cgraph_node::get_create (decl)->call_function_insertion_hooks (); + symtab->call_cgraph_insertion_hooks (cgraph_node::get_create (decl)); pop_cfun (); @@ -32304,7 +32304,7 @@ ix86_generate_version_dispatcher_body (void *node_p) } dispatch_function_versions (resolver_decl, &fn_ver_vec, &empty_bb); - rebuild_cgraph_edges (); + cgraph_edge::rebuild_edges (); pop_cfun (); return resolver_decl; } @@ -32493,7 +32493,7 @@ fold_builtin_cpu (tree fndecl, tree *args) "__cpu_model"); - varpool_add_new_variable (__cpu_model_var); + varpool_node::add (__cpu_model_var); gcc_assert ((args != NULL) && (*args != NULL)); diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c index 3ae61db..ee18e26 100644 --- a/gcc/config/microblaze/microblaze.c +++ b/gcc/config/microblaze/microblaze.c @@ -3350,7 +3350,7 @@ microblaze_asm_output_ident (const char *string) int size; char *buf; - if (cgraph_state != CGRAPH_STATE_PARSING) + if (symtab->state != PARSING) return; size = strlen (string) + 1; @@ -3360,7 +3360,7 @@ microblaze_asm_output_ident (const char *string) section_asm_op = READONLY_DATA_SECTION_ASM_OP; buf = ACONCAT ((section_asm_op, "\n\t.ascii \"", string, "\\0\"\n", NULL)); - add_asm_node (build_string (strlen (buf), buf)); + symtab->finalize_toplevel_asm (build_string (strlen (buf), buf)); } static void |