diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2018-12-27 22:23:30 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2018-12-27 21:23:30 +0000 |
commit | f7293b9dfab5e6e760f65934f76bbaa7184b0f45 (patch) | |
tree | 6a2c9e2c7738fe46774569842e7ff2063b3b67cb /gcc/tree.c | |
parent | 03b2d3defa7ef8c258d48f4bfbd66a08c27ea19c (diff) | |
download | gcc-f7293b9dfab5e6e760f65934f76bbaa7184b0f45.zip gcc-f7293b9dfab5e6e760f65934f76bbaa7184b0f45.tar.gz gcc-f7293b9dfab5e6e760f65934f76bbaa7184b0f45.tar.bz2 |
ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
* ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
(polymorphic_call_target_hasher::hash): Hash it.
(polymorphic_call_target_hasher::equal): Compare it.
(possible_polymorphic_call_targets): Set it.
* tree.c (free_lang_data): Rebuild type inheritance graph even on
non-LTO path.
* g++.dg/ipa/devirt-53.C: New testcase.
From-SVN: r267438
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -6191,7 +6191,12 @@ free_lang_data (void) /* If we are the LTO frontend we have freed lang-specific data already. */ if (in_lto_p || (!flag_generate_lto && !flag_generate_offload)) - return 0; + { + /* Rebuild type inheritance graph even when not doing LTO to get + consistent profile data. */ + rebuild_type_inheritance_graph (); + return 0; + } fld_incomplete_types = new hash_map<tree, tree>; fld_simplified_types = new hash_map<tree, tree>; |