aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-devirt.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2019-11-04 20:39:52 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2019-11-04 19:39:52 +0000
commit2bc2379be5c98d34ecbb347b2abf059aa6d94499 (patch)
treec77dfa441b49c1963d53760f79ab87018bafc88a /gcc/ipa-devirt.c
parent0ec77a6c25cbe321d9712e41a3aa04dff97eaaa6 (diff)
downloadgcc-2bc2379be5c98d34ecbb347b2abf059aa6d94499.zip
gcc-2bc2379be5c98d34ecbb347b2abf059aa6d94499.tar.gz
gcc-2bc2379be5c98d34ecbb347b2abf059aa6d94499.tar.bz2
ipa-inline-transform.c: Include ipa-utils.h
* ipa-inline-transform.c: Include ipa-utils.h (inline_call): Set thunk_expansion flag. * ipa-utils.h (thunk_expansion): Declare. * ipa-devirt.c (thunk_expansion): New global var. (devirt_node_removal_hook): Do not invalidate cache while doing thunk expansion. From-SVN: r277789
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r--gcc/ipa-devirt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index a14e795..4a73ba1 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -172,6 +172,11 @@ struct default_hash_traits <type_pair>
}
};
+/* HACK alert: this is used to communicate with ipa-inline-transform that
+ thunk is being expanded and there is no need to clear the polymorphic
+ call target cache. */
+bool thunk_expansion;
+
static bool odr_types_equivalent_p (tree, tree, bool, bool *,
hash_set<type_pair> *,
location_t, location_t);
@@ -2747,6 +2752,7 @@ static void
devirt_node_removal_hook (struct cgraph_node *n, void *d ATTRIBUTE_UNUSED)
{
if (cached_polymorphic_call_targets
+ && !thunk_expansion
&& cached_polymorphic_call_targets->contains (n))
free_polymorphic_call_targets_hash ();
}