This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix recrusive inlining into thunks
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 May 2016 12:05:11 +0200
- Subject: Fix recrusive inlining into thunks
- Authentication-results: sourceware.org; auth=none
Hi,
this patch fixes ICE when thunk is inlined and call within thunk too. We need
to recurse in this case because inlining thunk does not introduce a new basic blocks
like normal inlining does.
Bootstrapped/regtested x86_64-linux, comitted.
Honza
Index: ChangeLog
===================================================================
--- ChangeLog (revision 236272)
+++ ChangeLog (working copy)
@@ -1,5 +1,9 @@
2016-05-16 Jan Hubicka <hubicka@ucw.cz>
+ * tree-inline.c (expand_call_inline): recurse after inlining thunk.
+
+2016-05-16 Jan Hubicka <hubicka@ucw.cz>
+
* tree.c (free_lang_data_in_decl): Also set target/optimization flags
for thunks.
Index: tree-inline.c
===================================================================
--- tree-inline.c (revision 236269)
+++ tree-inline.c (working copy)
@@ -4485,6 +4485,7 @@ expand_call_inline (basic_block bb, gimp
gimple_call_set_fndecl (stmt, edge->callee->decl);
update_stmt (stmt);
id->src_node->remove ();
+ expand_call_inline (bb, stmt, id);
return true;
}
fn = cg_edge->callee->decl;