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]

Fix redirection in ipa.c


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.
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);
 	}
     }


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