diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-02-11 23:54:21 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-02-11 22:54:21 +0000 |
commit | ec77d61fe3a2b7882aaaae413b25aea878bed33d (patch) | |
tree | 9df630d2652c935d26cf3f91eb9ed4ef6e67f462 /gcc/ipa-utils.h | |
parent | 5a4dcd9bd902ebef3542a89eb6d71e1913052354 (diff) | |
download | gcc-ec77d61fe3a2b7882aaaae413b25aea878bed33d.zip gcc-ec77d61fe3a2b7882aaaae413b25aea878bed33d.tar.gz gcc-ec77d61fe3a2b7882aaaae413b25aea878bed33d.tar.bz2 |
re PR lto/59468 (ICE on invalid C++ code with LTO in gimple_get_virt_method_for_binfo, at gimple-fold.c:3224)
PR lto/59468
* ipa-utils.h (possible_polymorphic_call_targets): Update prototype
and wrapper.
* ipa-devirt.c: Include demangle.h
(odr_violation_reported): New static variable.
(add_type_duplicate): Update odr_violations.
(maybe_record_node): Add completep parameter; update it.
(record_target_from_binfo): Add COMPLETEP parameter;
update it as needed.
(possible_polymorphic_call_targets_1): Likewise.
(struct polymorphic_call_target_d): Add nonconstruction_targets;
rename FINAL to COMPLETE.
(record_targets_from_bases): Sanity check we found the binfo;
fix COMPLETEP updating.
(possible_polymorphic_call_targets): Add NONCONSTRUTION_TARGETSP
parameter, fix computing of COMPLETEP.
(dump_possible_polymorphic_call_targets): Imrove readability of dump; at
LTO time do demangling.
(ipa_devirt): Use nonconstruction_targets; Improve dumps.
* gimple-fold.c (gimple_get_virt_method_for_vtable): Add can_refer
parameter.
(gimple_get_virt_method_for_binfo): Likewise.
* gimple-fold.h (gimple_get_virt_method_for_binfo,
gimple_get_virt_method_for_vtable): Update prototypes.
PR lto/59468
* g++.dg/ipa/devirt-27.C: New testcase.
* g++.dg/ipa/devirt-26.C: New testcase.
From-SVN: r207702
Diffstat (limited to 'gcc/ipa-utils.h')
-rw-r--r-- | gcc/ipa-utils.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ipa-utils.h b/gcc/ipa-utils.h index d595e8a..a2c985a 100644 --- a/gcc/ipa-utils.h +++ b/gcc/ipa-utils.h @@ -76,7 +76,8 @@ vec <cgraph_node *> possible_polymorphic_call_targets (tree, HOST_WIDE_INT, ipa_polymorphic_call_context, bool *final = NULL, - void **cache_token = NULL); + void **cache_token = NULL, + int *nonconstruction_targets = NULL); odr_type get_odr_type (tree, bool insert = false); void dump_possible_polymorphic_call_targets (FILE *, tree, HOST_WIDE_INT, const ipa_polymorphic_call_context &); @@ -105,7 +106,8 @@ bool vtable_pointer_value_to_vtable (tree, tree *, unsigned HOST_WIDE_INT *); inline vec <cgraph_node *> possible_polymorphic_call_targets (struct cgraph_edge *e, bool *final = NULL, - void **cache_token = NULL) + void **cache_token = NULL, + int *nonconstruction_targets = NULL) { gcc_checking_assert (e->indirect_info->polymorphic); ipa_polymorphic_call_context context = {e->indirect_info->offset, @@ -115,7 +117,8 @@ possible_polymorphic_call_targets (struct cgraph_edge *e, return possible_polymorphic_call_targets (e->indirect_info->otr_type, e->indirect_info->otr_token, context, - final, cache_token); + final, cache_token, + nonconstruction_targets); } /* Same as above but taking OBJ_TYPE_REF as an parameter. */ |