This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/35452] erasing uncessary warning for basic block frequency computation
- From: "zhouyi04 at ios dot cn" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Mar 2008 07:03:13 -0000
- Subject: [Bug tree-optimization/35452] erasing uncessary warning for basic block frequency computation
- References: <bug-35452-14209@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from zhouyi04 at ios dot cn 2008-03-05 07:03 -------
(In reply to comment #0)
Sorry there are some problem with 1st patch because the edge e
maybe removed after redirection.
2 4
| \ /
\ 5
\ |
6
In function redirect_edge_succ_nodup, the edge from 5 to 6 will
be removed because there exists one from 2 to 6.
following is correct patch:
--- gcc/gcc/tree-cfgcleanup.c~ Wed Mar 5 14:13:00 2008
+++ gcc/gcc/tree-cfgcleanup.c Wed Mar 5 14:13:52 2008
@@ -418,6 +418,10 @@
{
bitmap_set_bit (cfgcleanup_altered_bbs, e->src->index);
+
+ bb->frequency -= EDGE_FREQUENCY(e);
+ bb->count -= e->count;
+
if (e->flags & EDGE_ABNORMAL)
{
/* If there is an abnormal edge, redirect it anyway, and
#########################################################
By the way, the frequency and count of forwarder block's succor will not be
affected because he is the only child of the forwarder block.
Anyone help me regression test it please
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35452