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

Re: Gcc 3.1 performance regressions with respect to 2.95.3


On Sun, Mar 17, 2002 at 06:50:26PM +0100, Jan Hubicka wrote:
> 	* cfgcleanup.c (outgoing_edges_math): Fix condition; relax
> 	frequencies match; avoid match on different loop depths.
> 	(try_crossjump_to_bb): Kill tests that no longer brings time
> 	savings.
> 	* cfgrtl.c (force_nonfallthru_and_redirect): Fix loop_depth
> 	updating code.
> 	(split_edge): Likewise.

Ok.

I fixed some grammar for you.


r~



Index: cfgcleanup.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgcleanup.c,v
retrieving revision 1.38
diff -c -p -d -r1.38 cfgcleanup.c
*** cfgcleanup.c	2002/02/09 02:18:11	1.38
--- cfgcleanup.c	2002/03/19 01:17:58
*************** outgoing_edges_match (mode, bb1, bb2)
*** 1097,1105 ****
  
        if (!bb2->succ
            || !bb2->succ->succ_next
! 	  || bb1->succ->succ_next->succ_next
  	  || !any_condjump_p (bb2->end)
! 	  || !onlyjump_p (bb1->end))
  	return false;
  
        b1 = BRANCH_EDGE (bb1);
--- 1097,1116 ----
  
        if (!bb2->succ
            || !bb2->succ->succ_next
! 	  || bb2->succ->succ_next->succ_next
  	  || !any_condjump_p (bb2->end)
! 	  || !onlyjump_p (bb2->end))
! 	return false;
! 
!       /* Do not crossjump across loop boundaries.  This is a temporary
! 	 workaround for the common scenario in which crossjumping results
! 	 in killing the duplicated loop condition, making bb-reorder rotate
! 	 the loop incorectly, leaving an extra unconditional jump inside
! 	 the loop.
! 
! 	 This check should go away once bb-reorder knows how to duplicate
! 	 code in this case or rotate the loops to avoid this scenario.  */
!       if (bb1->loop_depth != bb2->loop_depth)
  	return false;
  
        b1 = BRANCH_EDGE (bb1);
*************** outgoing_edges_match (mode, bb1, bb2)
*** 1175,1183 ****
  	    /* Do not use f2 probability as f2 may be forwarded.  */
  	    prob2 = REG_BR_PROB_BASE - b2->probability;
  
! 	  /* Fail if the difference in probabilities is
! 	     greater than 5%.  */
! 	  if (abs (b1->probability - prob2) > REG_BR_PROB_BASE / 20)
  	    {
  	      if (rtl_dump_file)
  		fprintf (rtl_dump_file,
--- 1186,1195 ----
  	    /* Do not use f2 probability as f2 may be forwarded.  */
  	    prob2 = REG_BR_PROB_BASE - b2->probability;
  
! 	  /* Fail if the difference in probabilities is greater than 50%.
! 	     This rules out two well-predicted branches with opposite
! 	     outcomes.  */
! 	  if (abs (b1->probability - prob2) > REG_BR_PROB_BASE / 5)
  	    {
  	      if (rtl_dump_file)
  		fprintf (rtl_dump_file,


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