aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2014-09-25 05:37:31 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2014-09-25 03:37:31 +0000
commit21a9ce6e0e7d79661b0f3d46623e3027a5860765 (patch)
tree859370599d14c06043c58177d7760babc1612913 /gcc
parent00d31d5e9fb1d309347ede4561f9165e59aa7f77 (diff)
downloadgcc-21a9ce6e0e7d79661b0f3d46623e3027a5860765.zip
gcc-21a9ce6e0e7d79661b0f3d46623e3027a5860765.tar.gz
gcc-21a9ce6e0e7d79661b0f3d46623e3027a5860765.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-devirt.c11
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 220027e..14aaf2c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
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
ipa-utils.h; add stream_int and stream_out methods.
(cgraph_indirect_call_info): Remove SPECILATIVE_OFFSET,
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index bc94a79..0b6e12b 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;