diff mbox

Fix ICE in estimate_edge_growth

Message ID 20150112065953.GB18797@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Jan. 12, 2015, 6:59 a.m. UTC
Hi,
this patch fixed -fprofile-use ICE where call_stmt_size is 0 while it should be non-zero.
This is becuase of cgraph_merge_profiles using get_body that applies transformations
and kills the profile. This is not intended to happen.

Bootstrapped/regtested x86_64-linux, will commit it shortly.

	* ipa-utils.c (cgraph_merge_profiles): Use get_untransformed_body.
diff mbox

Patch

Index: ipa-utils.c
===================================================================
--- ipa-utils.c	(revision 219430)
+++ ipa-utils.c	(working copy)
@@ -474,8 +474,8 @@ 
       gcc_assert (!*slot);
       *slot = state;
     }
-  src->get_body ();
-  dst->get_body ();
+  src->get_untransformed_body ();
+  dst->get_untransformed_body ();
   srccfun = DECL_STRUCT_FUNCTION (src->decl);
   dstcfun = DECL_STRUCT_FUNCTION (dst->decl);
   if (n_basic_blocks_for_fn (srccfun)