This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/48641] [4.7 Regression] ICE: verify_flow_info failed: Wrong frequency of block 77 -419530 with -O -fno-tree-ccp -fno-tree-copy-prop
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Dec 2011 21:47:08 +0000
- Subject: [Bug tree-optimization/48641] [4.7 Regression] ICE: verify_flow_info failed: Wrong frequency of block 77 -419530 with -O -fno-tree-ccp -fno-tree-copy-prop
- Auto-submitted: auto-generated
- References: <bug-48641-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48641
--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-12-23 21:47:08 UTC ---
OK, the problem is that profile is wrong and jump threading gets into
conflicting results and the results are propagated through the testcase because
of specific CFG. I think all we can do is to add capping. I am testing
Index: tree-ssa-threadupdate.c
===================================================================
--- tree-ssa-threadupdate.c (revision 182657)
+++ tree-ssa-threadupdate.c (working copy)
@@ -513,7 +513,11 @@ redirect_edges (void **slot, void *data)
e->src->index, e->dest->index, rd->dup_block->index);
rd->dup_block->count += e->count;
- rd->dup_block->frequency += EDGE_FREQUENCY (e);
+
+ /* Excessive jump threading may make frequencies large enough so
+ the computation overflows. */
+ if (rd->dup_block->frequency < BB_FREQ_MAX * 2)
+ rd->dup_block->frequency += EDGE_FREQUENCY (e);
EDGE_SUCC (rd->dup_block, 0)->count += e->count;
/* Redirect the incoming edge to the appropriate duplicate
block. */