This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Add missing update_stmt to cgraph_redirect_edge_call_stmt_to_callee


Hi,

when investigating an ICE in LTO of 483.xalancbmk with my
devirtualization patches, I have found out that a call to update_stmt
is missing in cgraph_redirect_edge_call_stmt_to_callee.  It should be
called because the function can replace an SSA target (or an
OBJ_TYPE_REF containg SSAs) with a decl, removing a use or two.

So this patch adds it.  I have bootstrapped and tested it on
x86_64-linux.  OK for the trunk and 4.5 branch?

Thanks,

Martin



2010-04-15  Martin Jambor  <mjambor@suse.cz>

	* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Update
	new_stmt.

Index: icln/gcc/cgraphunit.c
===================================================================
--- icln.orig/gcc/cgraphunit.c
+++ icln/gcc/cgraphunit.c
@@ -2260,6 +2260,7 @@ cgraph_redirect_edge_call_stmt_to_callee
 
   gsi = gsi_for_stmt (e->call_stmt);
   gsi_replace (&gsi, new_stmt, true);
+  update_stmt (new_stmt);
 
   /* Update EH information too, just in case.  */
   maybe_clean_or_replace_eh_stmt (e->call_stmt, new_stmt);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]