diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-02-03 21:41:30 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-02-03 20:41:30 +0000 |
commit | 85942f45e92cf0d42196018892633944a234ab57 (patch) | |
tree | ae16bce09c999f0a1aa07a51255fd97b90ea03c7 /gcc/gimple-fold.h | |
parent | bddc974e716ad04c2de84f0168ebf9d192c54098 (diff) | |
download | gcc-85942f45e92cf0d42196018892633944a234ab57.zip gcc-85942f45e92cf0d42196018892633944a234ab57.tar.gz gcc-85942f45e92cf0d42196018892633944a234ab57.tar.bz2 |
re PR ipa/59831 (ice in cgraph_speculative_call_info with -O3)
PR ipa/59831
* g++.dg/ipa/devirt-24.C: New testcase.
* ipa-cp.c (ipa_get_indirect_edge_target_1): Give up on -fno-devirtualize;
Try to devirtualize by the knowledge of virtual table pointer given by
aggregate propagation.
* ipa-prop.c (try_make_edge_direct_virtual_call): Likewise.
ipa_print_node_jump_functions): Dump also offset that
is relevant for polymorphic calls.
(determine_known_aggregate_parts): Add arg_type parameter; use it
instead of determining the type from pointer type.
(ipa_compute_jump_functions_for_edge): Update call of
determine_known_aggregate_parts.
* gimple-fold.c (gimple_get_virt_method_for_vtable): Break out from ...
(gimple_get_virt_method_for_binfo): ... here; simplify using
vtable_pointer_value_to_vtable.
* gimple-fold.h (gimple_get_virt_method_for_vtable): Declare.
* ipa-devirt.c (subbinfo_with_vtable_at_offset): Turn OFFSET parameter
to unsigned HOST_WIDE_INT; Use vtable_pointer_value_to_vtable.
(vtable_pointer_value_to_vtable): Break out from ...; handle also
POINTER_PLUS_EXPR.
(vtable_pointer_value_to_binfo): ... here.
* ipa-utils.h (vtable_pointer_value_to_vtable): Declare.
From-SVN: r207439
Diffstat (limited to 'gcc/gimple-fold.h')
-rw-r--r-- | gcc/gimple-fold.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimple-fold.h b/gcc/gimple-fold.h index 886cd02..3dbce9c 100644 --- a/gcc/gimple-fold.h +++ b/gcc/gimple-fold.h @@ -38,6 +38,8 @@ extern tree gimple_fold_stmt_to_constant (gimple, tree (*) (tree)); extern tree fold_const_aggregate_ref_1 (tree, tree (*) (tree)); extern tree fold_const_aggregate_ref (tree); extern tree gimple_get_virt_method_for_binfo (HOST_WIDE_INT, tree); +extern tree gimple_get_virt_method_for_vtable (HOST_WIDE_INT, tree, + unsigned HOST_WIDE_INT); extern bool gimple_val_nonnegative_real_p (tree); extern tree gimple_fold_indirect_ref (tree); extern bool arith_code_with_undefined_signed_overflow (tree_code); |