This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/35452] erasing uncessary warning for basic block frequency computation



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]