From 21a9ce6e0e7d79661b0f3d46623e3027a5860765 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 25 Sep 2014 05:37:31 +0200 Subject: [PATCH] ipa-devirt.c (possible_polymorphic_call_targets): Remove forgotten debug output; canonicalize querries more wtih LTO. * ipa-devirt.c (possible_polymorphic_call_targets): Remove forgotten debug output; canonicalize querries more wtih LTO. From-SVN: r215577 --- gcc/ChangeLog | 5 +++++ gcc/ipa-devirt.c | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 220027e8a30..14aaf2ccf68 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-09-24 Jan Hubicka + + * ipa-devirt.c (possible_polymorphic_call_targets): Remove + forgotten debug output; canonicalize querries more wtih LTO. + 2014-09-24 Jan Hubicka * cgraph.h (class ipa_polymorphic_call_context): Move here from diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index bc94a79d038..0b6e12bef95 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -3726,7 +3726,6 @@ possible_polymorphic_call_targets (tree otr_type, if ((context.outer_type || context.speculative_outer_type) && !context.restrict_to_inner_class (otr_type)) { - fprintf (stderr, "Invalid\n"); if (completep) *completep = true; if (cache_token) @@ -3771,6 +3770,16 @@ possible_polymorphic_call_targets (tree otr_type, } } + if (in_lto_p) + { + if (context.outer_type != otr_type) + context.outer_type + = get_odr_type (context.outer_type, true)->type; + if (context.speculative_outer_type) + context.speculative_outer_type + = get_odr_type (context.speculative_outer_type, true)->type; + } + /* Lookup cached answer. */ key.type = type; key.otr_token = otr_token; -- 2.30.2