ipa-devirt.c (odr_type_d): Add field all_derivations_known.
authorJan Hubicka <hubicka@ucw.cz>
Thu, 17 Apr 2014 02:43:53 +0000 (04:43 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 17 Apr 2014 02:43:53 +0000 (02:43 +0000)
commit2d1644bf5b2a2186aa00d50fa7c44832a020f5a8
treed8e52d8022602d98ec6b0fde5b40d561be3e613b
parent7c1b1692e15e8800f984dfd6404c04401a1142d6
ipa-devirt.c (odr_type_d): Add field all_derivations_known.

* ipa-devirt.c (odr_type_d): Add field all_derivations_known.
(type_all_derivations_known_p): New predicate.
(type_all_ctors_visible_p): New predicate.
(type_possibly_instantiated_p): New predicate.
(get_odr_type): Compute all_derivations_known.
(dump_odr_type): Dump the flag.
(maybe_record_type): Cleanup.
(record_target_from_binfo): Add bases_to_consider array;
record bases for types w/o instances and skip CXX destructor.
(possible_polymorphic_call_targets_1): Add bases_to_consider
and consider_construction parameters; check if type may
have instance.
(get_polymorphic_call_info): Set maybe_in_construction to true
when we know nothing.
(record_targets_from_bases): Skip CXX destructors; they are
never called for types in construction.
(possible_polymorphic_call_targets): Do not record target when
type may not have instance.

* g++.dg/ipa/devirt-31.C: New testcase.

From-SVN: r209461
gcc/ChangeLog
gcc/ipa-devirt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ipa/devirt-31.C [new file with mode: 0644]