This is the mail archive of the gcc-patches@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]

[patch] Fix cfghooks.c:split_block


Hello,

I have just noticed that I lost a piece of code responsible for updating
frequencies during the cfghooks rewrite.  Here it is, commited as
obvious.

Zdenek

Index: cfghooks.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfghooks.c,v
retrieving revision 1.1.2.4.2.3
diff -c -3 -p -r1.1.2.4.2.3 cfghooks.c
*** cfghooks.c	22 Jan 2004 01:10:45 -0000	1.1.2.4.2.3
--- cfghooks.c	29 Jan 2004 12:46:31 -0000
*************** split_block (basic_block bb, void *i)
*** 305,310 ****
--- 305,311 ----
    basic_block new_bb;
    bool irr = (bb->flags & BB_IRREDUCIBLE_LOOP) != 0;
    int flags = EDGE_FALLTHRU;
+   edge e;
  
    if (!cfg_hooks->split_block)
      internal_error ("%s does not support split_block.", cfg_hooks->name);
*************** split_block (basic_block bb, void *i)
*** 328,334 ****
        set_immediate_dominator (CDI_DOMINATORS, new_bb, bb);
      }
  
!   return make_edge (bb, new_bb, flags);
  }
  
  /* Splits block BB just after labels.  The newly created edge is returned.  */
--- 329,339 ----
        set_immediate_dominator (CDI_DOMINATORS, new_bb, bb);
      }
  
!   e = make_edge (bb, new_bb, flags);
!   e->probability = REG_BR_PROB_BASE;
!   e->count = bb->count;
! 
!   return e;
  }
  
  /* Splits block BB just after labels.  The newly created edge is returned.  */


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