* ipa-devirt.c (odr_type_d): Add field all_derivations_known.
commitafb441656c670b6e22014c30859c8c21f15fbb10
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Apr 2014 02:43:53 +0000 (17 02:43 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Apr 2014 02:43:53 +0000 (17 02:43 +0000)
treed8e52d8022602d98ec6b0fde5b40d561be3e613b
parent6c5f20b680f656069b0fb41a1912fae1d06818dc
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209461 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/ipa-devirt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ipa/devirt-31.C [new file with mode: 0644]