* Fix ICE while inlining thunks
@ 2016-05-15 22:20 Jan Hubicka
0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2016-05-15 22:20 UTC (permalink / raw)
To: gcc-patches
Hi,
when inlining thunks we incorrectly update edge caches of callees. This is because
bogus function_symbol call. edge->callee is the inline function body and that is never
alias.
Bootstrapped/regtste x86_64-linux, will commit it tomorrow.
* ipa-inline.c (report_inline_failed_reason): Look into thunks, too
(inline_small_functions): Do not look for function symbol when resetting
caches.
Index: ipa-inline.c
===================================================================
--- ipa-inline.c (revision 236211)
+++ ipa-inline.c (working copy)
@@ -233,11 +233,11 @@ report_inline_failed_reason (struct cgra
if ((e->inline_failed == CIF_TARGET_OPTION_MISMATCH
|| e->inline_failed == CIF_OPTIMIZATION_MISMATCH)
&& e->caller->lto_file_data
- && e->callee->function_symbol ()->lto_file_data)
+ && e->callee->ultimate_alias_target ()->lto_file_data)
{
fprintf (dump_file, " LTO objects: %s, %s\n",
e->caller->lto_file_data->file_name,
- e->callee->function_symbol ()->lto_file_data->file_name);
+ e->callee->ultimate_alias_target ()->lto_file_data->file_name);
}
if (e->inline_failed == CIF_TARGET_OPTION_MISMATCH)
cl_target_option_print_diff
@@ -2027,7 +2027,7 @@ inline_small_functions (void)
inline_call (edge, true, &new_indirect_edges, &overall_size, true);
add_new_edges_to_heap (&edge_heap, new_indirect_edges);
- reset_edge_caches (edge->callee->function_symbol ());
+ reset_edge_caches (edge->callee);
update_callee_keys (&edge_heap, where, updated_nodes);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-15 22:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-15 22:20 Fix ICE while inlining thunks Jan Hubicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).