diff options
author | Martin Jambor <mjambor@suse.cz> | 2012-08-09 18:05:46 +0200 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2012-08-09 18:05:46 +0200 |
commit | 8b7773a4ee4833570eb306cbd64884c288f89d57 (patch) | |
tree | b4b8ef818a3ba89f292cf70e40875c201119ffe6 /gcc/cgraph.h | |
parent | b67b3838e94c69f500c84ff58ffa44720a0ec79c (diff) | |
download | gcc-8b7773a4ee4833570eb306cbd64884c288f89d57.zip gcc-8b7773a4ee4833570eb306cbd64884c288f89d57.tar.gz gcc-8b7773a4ee4833570eb306cbd64884c288f89d57.tar.bz2 |
cgraph.h (cgraph_indirect_call_info): Field anc_offse renamd to offset, updated all users.
2012-08-09 Martin Jambor <mjambor@suse.cz>
* cgraph.h (cgraph_indirect_call_info): Field anc_offse renamd to
offset, updated all users. New field agg_contents.
* ipa-prop.h (jump_func_type): Removed IPA_JF_CONST_MEMBER_PTR.
(ipa_pass_through_data): New field agg_preserved.
(ipa_ancestor_jf_data): Likewise.
(ipa_member_ptr_cst): Removed.
(ipa_agg_jf_item): New type.
(ipa_agg_jump_function): Likewise.
(ipa_jump_func): New field agg. Removed field member_cst.
(ipa_get_jf_pass_through_agg_preserved): New function.
(ipa_get_jf_ancestor_agg_preserved): Likewise.
(ipa_get_jf_member_ptr_pfn): Removed.
(ipa_find_agg_cst_for_param): Declare.
(ipa_load_from_parm_agg): Likewise.
* ipa-prop.c (param_analysis_info): Fields modified and
visited_statements rename to parm_modified and parm_visited_statements
respectively, added fields ref_modified, ref_visited_statements,
pt_modified and pt_visited_statements.
(ipa_print_node_jump_functions_for_edge): Do not dump const member
functions. Dump agg_preserved flags and aggregate jump functions.
(ipa_set_jf_simple_pass_through): Set also agg_preserved.
(ipa_set_ancestor_jf): Likewise.
(ipa_set_jf_arith_pass_through): Clear agg_preserved.
(ipa_set_jf_member_ptr_cst): Removed.
(is_parm_modified_before_stmt): Logic reversed, renamed to
parm_preserved_before_stmt_p. Cache visited bitmap only for
naked DECL parameters. All callers updated.
(load_from_unmodified_param): Allow NULL parms_ainfo.
(parm_ref_data_preserved_p): New function.
(parm_ref_data_pass_through_p): Likewise.
(ipa_load_from_parm_agg_1): Likewise.
(ipa_load_from_parm_agg): Likewise.
(compute_complex_assign_jump_func): Check if aggregate contents are
preserved.
(compute_complex_ancestor_jump_func): Likewise.
(compute_scalar_jump_functions): Removed.
(type_like_member_ptr_p): Also check field position are known and
sane.
(compute_pass_through_member_ptrs): Removed.
(determine_cst_member_ptr): Likewise.
(ipa_known_agg_contents_list): New type.
(determine_known_aggregate_parts): New function.
(compute_cst_member_ptr_arguments): Removed.
(ipa_compute_jump_functions_for_edge): Compute all kinds of jump
functions (scalar, aggregate and member pointer).
(ipa_get_member_ptr_load_param): Incorporate into
ipa_get_stmt_member_ptr_load_param, also pass back an offset.
(ipa_note_param_call): Clear agg_contents.
(ipa_analyze_indirect_call_uses): Also look for simple pointers loaded
from aggregates. In such cases, store offset of the called field.
(ipa_analyze_node): Initialize new fields of param_analysis_info.
(update_jump_functions_after_inlining): Handle aggregate contents.
(ipa_find_agg_cst_for_param): New function.
(try_make_edge_direct_simple_call): Handle called aggregate values.
(update_indirect_edges_after_inlining): Make sure aggregate preserving
jump functions comply with type compatibility requirements.
(ipa_edge_duplication_hook): Copy also aggregate jump functions.
(ipa_write_jump_function): Stream agg_preserved flags and aggregate
jump functions. Do not stream member pointer constant jump functions.
(ipa_read_jump_function): Likewise.
(ipa_write_indirect_edge_info): Stream new cgraph_indirect_call_info
fields.
(ipa_read_indirect_edge_info): Likewise.
* testsuite/gcc.dg/ipa/iinline-4.c: New test.
* testsuite/gcc.dg/ipa/iinline-5.c: Likewise.
* testsuite/gcc.dg/ipa/iinline-6.c: Likewise.
* testsuite/gcc.dg/ipa/iinline-7.c: Likewise.
* testsuite/gcc.dg/lto/20120723_0.c: Likewise.
* testsuite/gcc.dg/lto/20120723_1.c: Likewise.
From-SVN: r190260
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 7b9098b..24ede64 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -338,9 +338,11 @@ typedef enum cgraph_inline_failed_enum { struct GTY(()) cgraph_indirect_call_info { - /* Offset accumulated from ancestor jump functions of inlined call graph - edges. */ - HOST_WIDE_INT anc_offset; + /* When polymorphic is set, this field contains offset where the object which + was actually used in the polymorphic resides within a larger structure. + If agg_contents is set, the field contains the offset within the aggregate + from which the address to call was loaded. */ + HOST_WIDE_INT offset; /* OBJ_TYPE_REF_TOKEN of a polymorphic call (if polymorphic is set). */ HOST_WIDE_INT otr_token; /* Type of the object from OBJ_TYPE_REF_OBJECT. */ @@ -353,6 +355,12 @@ struct GTY(()) cgraph_indirect_call_info /* Set when the call is a virtual call with the parameter being the associated object pointer rather than a simple direct call. */ unsigned polymorphic : 1; + /* Set when the call is a call of a pointer loaded from contents of an + aggregate at offset. */ + unsigned agg_contents : 1; + /* When the previous bit is set, this one determines whether the destination + is loaded from a parameter passed by reference. */ + unsigned by_ref : 1; }; struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) cgraph_edge { |