Fix redirection in ipa.c

Message ID
State New
Headers show

Commit Message

Jan Hubicka Sept. 9, 2013, 6:15 a.m.
this patch fixes ICE when edge redirection happens just before summary generation.
At that time we still don't want edges to be redirected when underlying statements
are not.

Bootstrapped/regtested x86_64-linux, comitted.

	* ipa.c (walk_polymorphic_call_targets): Fix redirection before IPA
	summary generation.


Index: ipa.c
--- ipa.c	(revision 202370)
+++ ipa.c	(working copy)
@@ -220,9 +220,9 @@  walk_polymorphic_call_targets (pointer_s
 		     cgraph_node_name (target), target->symbol.order);
 	  edge = cgraph_make_edge_direct (edge, target);
-	  if (cgraph_state != CGRAPH_STATE_IPA_SSA)
+	  if (!inline_summary_vec && edge->call_stmt)
 	    cgraph_redirect_edge_call_stmt_to_callee (edge);
-	  else if (inline_summary_vec)
+	  else
 	    inline_update_overall_summary (node);