ipa-devirt.c (possible_polymorphic_call_targets): Remove forgotten debug output;...
authorJan Hubicka <hubicka@ucw.cz>
Thu, 25 Sep 2014 03:37:31 +0000 (05:37 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 25 Sep 2014 03:37:31 +0000 (03:37 +0000)
* ipa-devirt.c (possible_polymorphic_call_targets): Remove
forgotten debug output; canonicalize querries more wtih LTO.

From-SVN: r215577

gcc/ChangeLog
gcc/ipa-devirt.c

index 220027e8a30801cae5de5e314191a139d1d39e7f..14aaf2ccf68a1a7d9fcf9b30c852d18a783c51ae 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-24  Jan Hubicka  <hubicka@ucw.cz>
+
+       * ipa-devirt.c (possible_polymorphic_call_targets): Remove
+       forgotten debug output; canonicalize querries more wtih LTO.
+
 2014-09-24  Jan Hubicka  <hubicka@ucw.cz>
 
        * cgraph.h (class ipa_polymorphic_call_context): Move here from
index bc94a79d0380b7c8ec7913eff83451b2302d484c..0b6e12bef954f8c1f3887bac02dab329bebee462 100644 (file)
@@ -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;