diff options
author | Martin Jambor <mjambor@suse.cz> | 2014-11-14 21:07:39 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2014-11-14 21:07:39 +0100 |
commit | 3b97a5c7c6113f5a32bf4546c50056d108729bb2 (patch) | |
tree | 7f3633f2cd764032721afc634a140441d4e8be7d /gcc/ipa-cp.c | |
parent | 4ab74a01477d4089a3474d52479ed372c9b5ae29 (diff) | |
download | gcc-3b97a5c7c6113f5a32bf4546c50056d108729bb2.zip gcc-3b97a5c7c6113f5a32bf4546c50056d108729bb2.tar.gz gcc-3b97a5c7c6113f5a32bf4546c50056d108729bb2.tar.bz2 |
ipa-prop.h (jump_func_type): Removed value IPA_JF_KNOWN_TYPE.
2014-11-14 Martin Jambor <mjambor@suse.cz>
* ipa-prop.h (jump_func_type): Removed value IPA_JF_KNOWN_TYPE.
(ipa_pass_through_data): Removed field type_preserved.
(ipa_ancestor_jf_data): removed fields type and type_preserved.
(ipa_jump_func): Removed field known_type.
(ipa_get_jf_known_type_offset): Removed.
(ipa_get_jf_known_type_base_type): Likewise.
(ipa_get_jf_known_type_component_type): Likewise.
(ipa_get_jf_ancestor_type): Likewise.
* ipa-cp.c (print_ipcp_constant_value): Removed BINFO handling.
(ipa_get_jf_pass_through_result): Likewise.
(ipa_get_jf_ancestor_result): Always build ptr_node_type accesses.
(values_equal_for_ipcp_p): Removed BINFO handling.
(ipa_get_indirect_edge_target_1): Updated comment.
* ipa-prop.c (ipa_print_node_jump_functions_for_edge): Removed handling
of IPA_JF_KNOWN_TYPE jump functions. Do not print removed fields.
(ipa_set_jf_known_type): Removed.
(ipa_set_jf_simple_pass_through): Do not set removed fields. Update
all callers.
(ipa_set_jf_arith_pass_through): Likewise.
(ipa_set_ancestor_jf): Likewise.
(ipa_binfo_from_known_type_jfunc): Removed.
(prop_type_change_info): Removed fields known_current_type and
multiple_types_encountered.
(extr_type_from_vtbl_ptr_store): Removed.
(check_stmt_for_type_change): Do not attempt to identify changed type.
(detect_type_change_from_memory_writes): Do not set the removed fields,
always set jfunc to unknown.
(compute_complex_assign_jump_func): Do not detect dynamic type change.
(compute_complex_ancestor_jump_func): Likewise.
(compute_known_type_jump_func): Removed.
(ipa_compute_jump_functions_for_edge): Do not detect dynamic type
change. Do not comute known type jump functions.
(combine_known_type_and_ancestor_jfs): Removed.
(update_jump_functions_after_inlining): Removed handling of
IPA_JF_KNOWN_TYPE jump functions. Do not set removed fields.
(ipa_write_jump_function): Do not stream removed fields or known type
jump functions.
(ipa_read_jump_function): Likewise.
From-SVN: r217589
Diffstat (limited to 'gcc/ipa-cp.c')
-rw-r--r-- | gcc/ipa-cp.c | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index 4f44c4c..0529f17 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -340,12 +340,7 @@ ipcp_lattice<valtype>::is_single_const () static void print_ipcp_constant_value (FILE * f, tree v) { - if (TREE_CODE (v) == TREE_BINFO) - { - fprintf (f, "BINFO "); - print_generic_expr (f, BINFO_TYPE (v), 0); - } - else if (TREE_CODE (v) == ADDR_EXPR + if (TREE_CODE (v) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (v, 0)) == CONST_DECL) { fprintf (f, "& "); @@ -842,21 +837,10 @@ ipa_get_jf_pass_through_result (struct ipa_jump_func *jfunc, tree input) { tree restype, res; - if (TREE_CODE (input) == TREE_BINFO) - { - if (ipa_get_jf_pass_through_type_preserved (jfunc)) - { - gcc_checking_assert (ipa_get_jf_pass_through_operation (jfunc) - == NOP_EXPR); - return input; - } - return NULL_TREE; - } - + gcc_checking_assert (is_gimple_ip_invariant (input)); if (ipa_get_jf_pass_through_operation (jfunc) == NOP_EXPR) return input; - gcc_checking_assert (is_gimple_ip_invariant (input)); if (TREE_CODE_CLASS (ipa_get_jf_pass_through_operation (jfunc)) == tcc_comparison) restype = boolean_type_node; @@ -883,9 +867,7 @@ ipa_get_jf_ancestor_result (struct ipa_jump_func *jfunc, tree input) tree t = TREE_OPERAND (input, 0); t = build_ref_for_offset (EXPR_LOCATION (t), t, ipa_get_jf_ancestor_offset (jfunc), - ipa_get_jf_ancestor_type (jfunc) - ? ipa_get_jf_ancestor_type (jfunc) - : ptr_type_node, NULL, false); + ptr_type_node, NULL, false); return build_fold_addr_expr (t); } else @@ -1051,9 +1033,6 @@ values_equal_for_ipcp_p (tree x, tree y) if (x == y) return true; - if (TREE_CODE (x) == TREE_BINFO || TREE_CODE (y) == TREE_BINFO) - return false; - if (TREE_CODE (x) == ADDR_EXPR && TREE_CODE (y) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (x, 0)) == CONST_DECL @@ -1740,9 +1719,8 @@ propagate_constants_accross_call (struct cgraph_edge *cs) } /* If an indirect edge IE can be turned into a direct one based on KNOWN_VALS - (which can contain both constants and binfos), KNOWN_CONTEXTS, KNOWN_AGGS or - AGG_REPS return the destination. The latter three can be NULL. If AGG_REPS - is not NULL, KNOWN_AGGS is ignored. */ + KNOWN_CONTEXTS, KNOWN_AGGS or AGG_REPS return the destination. The latter + three can be NULL. If AGG_REPS is not NULL, KNOWN_AGGS is ignored. */ static tree ipa_get_indirect_edge_target_1 (struct cgraph_edge *ie, |