Fix ICE while updating inliner summary

Message ID 20200101104802.GA37606@kam.mff.cuni.cz
State New
Headers show
Series
  • Fix ICE while updating inliner summary
Related show

Commit Message

Jan Hubicka Jan. 1, 2020, 10:48 a.m.
Hi,
this patch fix ICE seen when LTO optimizing clang.

Bootstrapped/regtested x86_64-linux.

	* ipa.c (walk_polymorphic_call_targets): Fix updating of overall
	summary.

Patch

Index: ipa.c
===================================================================
--- ipa.c	(revision 279724)
+++ ipa.c	(working copy)
@@ -244,7 +244,8 @@  walk_polymorphic_call_targets (hash_set<
 	    }
 	  edge = edge->make_direct (target);
 	  if (ipa_fn_summaries)
-	    ipa_update_overall_fn_summary (node);
+	    ipa_update_overall_fn_summary (node->inlined_to
+					   ? node->inlined_to : node);
 	  else if (edge->call_stmt)
 	    edge->redirect_call_stmt_to_callee ();
 	}