Patchwork Fix redirection in ipa.c

login
register
mail settings
Submitter Jan Hubicka
Date Sept. 9, 2013, 6:15 a.m.
Message ID <20130909061524.GC10568@kam.mff.cuni.cz>
Download mbox | patch
Permalink /patch/273493/
State New
Headers show

Comments

Jan Hubicka - Sept. 9, 2013, 6:15 a.m.
Hi,
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.

Patch

Index: ipa.c
===================================================================
--- ipa.c	(revision 202370)
+++ ipa.c	(working copy)
@@ -220,9 +220,9 @@  walk_polymorphic_call_targets (pointer_s
 		     edge->caller->symbol.order,
 		     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);
 	}
     }