This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix ICE in estimate_edge_growth
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Jan 2015 07:59:53 +0100
- Subject: Fix ICE in estimate_edge_growth
- Authentication-results: sourceware.org; auth=none
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.
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)