diff options
author | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-03 22:10:19 +0000 |
---|---|---|
committer | jamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-06-03 22:10:19 +0000 |
commit | 4fa83f96fd44f775f07d4a1be02203254a25ab55 (patch) | |
tree | f93c114daf03955a690d8f6f80c567c720ca9874 /gcc/ipa-prop.h | |
parent | bc70e8cf3925c8ed80f807d896bded25071d4f89 (diff) |
2012-06-03 Martin Jambor <mjambor@suse.cz>
* ipa-prop.h (ipa_get_jf_known_type_offset): New function.
(ipa_get_jf_known_type_base_type): Likewise.
(ipa_get_jf_known_type_component_type): Likewise.
(ipa_get_jf_constant): Likewise.
(ipa_get_jf_pass_through_formal_id): Likewise.
(ipa_get_jf_pass_through_operation): Likewise.
(ipa_get_jf_ancestor_offset): Likewise.
(ipa_get_jf_ancestor_type): Likewise.
(ipa_get_jf_ancestor_formal_id): Likewise.
(ipa_get_jf_member_ptr_pfn): Likewise.
* ipa-prop.c (ipa_set_jf_known_type): New function.
(ipa_set_jf_constant): Likewise.
(ipa_set_jf_simple_pass_through): Likewise.
(ipa_set_jf_arith_pass_through): Likewise.
(ipa_set_ancestor_jf): Likewise.
(fill_member_ptr_cst_jump_function): Moved up and renamed to
ipa_set_jf_member_ptr_cst.
(detect_type_change_1): Use the new jump function creation functions.
(compute_complex_assign_jump_func): Likewise.
(compute_complex_ancestor_jump_func): Likewise.
(compute_known_type_jump_func): Likewise.
(compute_scalar_jump_functions): Likewise.
(compute_pass_through_member_ptrs): Likewise.
(determine_cst_member_ptr): Likewise.
(combine_known_type_and_ancestor_jfs): Likewise.
(try_make_edge_direct_simple_call): Likewise.
(try_make_edge_direct_virtual_call): Likewise.
(update_indirect_edges_after_inlining): Likewise.
* ipa-cp.c (ipa_get_jf_pass_through_result): Use jump function
access functions. Incorporat NOP_EXPR and BINFO handling from its
callers.
(ipa_get_jf_ancestor_result): Likewise. Incorporate handling BINFOs
which was in its callers.
(ipa_value_from_jfunc): Use jump function access functions. Some
functionality moved to functions above.
(propagate_vals_accross_ancestor): Likewise.
(propagate_vals_accross_pass_through): Use jump function access
functions.
(propagate_accross_jump_function): Likewise.
* ipa-inline-analysis.c (remap_edge_change_prob): Use jump function
access functions.
(inline_merge_summary): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188156 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-prop.h')
-rw-r--r-- | gcc/ipa-prop.h | 104 |
1 files changed, 103 insertions, 1 deletions
diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index 1a609a5b5b7..7faa3e1eec0 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -113,7 +113,7 @@ struct GTY(()) ipa_ancestor_jf_data { /* Offset of the field representing the ancestor. */ HOST_WIDE_INT offset; - /* TYpe of the result. */ + /* Type of the result. */ tree type; /* Number of the caller's formal parameter being passed. */ int formal_id; @@ -149,6 +149,108 @@ typedef struct GTY (()) ipa_jump_func DEF_VEC_O (ipa_jump_func_t); DEF_VEC_ALLOC_O (ipa_jump_func_t, gc); +/* Return the offset of the component that is decribed by a known type jump + function JFUNC. */ + +static inline HOST_WIDE_INT +ipa_get_jf_known_type_offset (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_KNOWN_TYPE); + return jfunc->value.known_type.offset; +} + +/* Return the base type of a known type jump function JFUNC. */ + +static inline tree +ipa_get_jf_known_type_base_type (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_KNOWN_TYPE); + return jfunc->value.known_type.base_type; +} + +/* Return the component type of a known type jump function JFUNC. */ + +static inline tree +ipa_get_jf_known_type_component_type (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_KNOWN_TYPE); + return jfunc->value.known_type.component_type; +} + +/* Return the constant stored in a constant jump functin JFUNC. */ + +static inline tree +ipa_get_jf_constant (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_CONST); + return jfunc->value.constant; +} + +/* Return the operand of a pass through jmp function JFUNC. */ + +static inline tree +ipa_get_jf_pass_through_operand (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_PASS_THROUGH); + return jfunc->value.pass_through.operand; +} + +/* Return the number of the caller's formal parameter that a pass through jump + function JFUNC refers to. */ + +static inline int +ipa_get_jf_pass_through_formal_id (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_PASS_THROUGH); + return jfunc->value.pass_through.formal_id; +} + +/* Return operation of a pass through jump function JFUNC. */ + +static inline enum tree_code +ipa_get_jf_pass_through_operation (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_PASS_THROUGH); + return jfunc->value.pass_through.operation; +} + +/* Return the offset of an ancestor jump function JFUNC. */ + +static inline HOST_WIDE_INT +ipa_get_jf_ancestor_offset (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_ANCESTOR); + return jfunc->value.ancestor.offset; +} + +/* Return the result type of an ancestor jump function JFUNC. */ + +static inline tree +ipa_get_jf_ancestor_type (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_ANCESTOR); + return jfunc->value.ancestor.type; +} + +/* Return the number of the caller's formal parameter that an ancestor jump + function JFUNC refers to. */ + +static inline int +ipa_get_jf_ancestor_formal_id (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_ANCESTOR); + return jfunc->value.ancestor.formal_id; +} + +/* Return the pfn part of a member pointer constant jump function JFUNC. */ + +static inline tree +ipa_get_jf_member_ptr_pfn (struct ipa_jump_func *jfunc) +{ + gcc_checking_assert (jfunc->type == IPA_JF_CONST_MEMBER_PTR); + return jfunc->value.member_cst.pfn; +} + /* Summary describing a single formal parameter. */ struct ipa_param_descriptor |