From 339f49ec21ea4870e25641f7a7e60703b5d86d50 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 18 May 2010 00:13:07 +0200 Subject: ipa-cp.c (ipcp_update_callgraph): Use ipa_is_param_used. * ipa-cp.c (ipcp_update_callgraph): Use ipa_is_param_used. (ipcp_estimate_growth): Likewise. (ipcp_const_param_count): Likewise. (ipcp_insert_stage): Likewise. * ipa-prop.c (visit_load_for_mod_analysis): New function. (visit_store_addr_for_mod_analysis): Set used flag. (ipa_detect_param_modifications): Set used flag for SSE params; update use of walk_stmt_load_store_addr_ops. (ipa_print_node_params): Print used flag. (ipa_write_node_info): Stream used flag. (ipa_read_node_info): Likewise. * ipa-prop.h (struct ipa_param_descriptor): Add used field. (ipa_is_param_used): New function. (lto_ipa_fixup_call_notes): Remove unused declaration. From-SVN: r159513 --- gcc/ipa-prop.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gcc/ipa-prop.h') diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index 0f9b5f39acc..c142c03db28 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -163,6 +163,8 @@ struct ipa_param_descriptor tree decl; /* Whether the value parameter has been modified within the function. */ unsigned modified : 1; + /* The parameter is used. */ + unsigned used : 1; }; /* ipa_node_params stores information related to formal parameters of functions @@ -237,6 +239,15 @@ ipa_is_param_modified (struct ipa_node_params *info, int i) return info->params[i].modified; } +/* Return the used flag corresponding to the Ith formal parameter of + the function associated with INFO. */ + +static inline bool +ipa_is_param_used (struct ipa_node_params *info, int i) +{ + return info->params[i].used; +} + /* Flag this node as having callers with variable number of arguments. */ static inline void @@ -489,7 +500,6 @@ void ipa_dump_param_adjustments (FILE *, ipa_parm_adjustment_vec, tree); void ipa_prop_write_jump_functions (cgraph_node_set set); void ipa_prop_read_jump_functions (void); void ipa_update_after_lto_read (void); -void lto_ipa_fixup_call_notes (struct cgraph_node *, gimple *); /* From tree-sra.c: */ bool build_ref_for_offset (tree *, tree, HOST_WIDE_INT, tree, bool); -- cgit v1.2.1