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]

cross jump buglet


Without this, cross jumping will think commoning the return
insn all by itself to be a win, thus undoing all the effort
spent to create the return insns in the first place.


r~


        * flow.c (flow_find_cross_jump): Don't consider unconditional
        return insns for commoning.

Index: flow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flow.c,v
retrieving revision 1.467
diff -c -p -d -r1.467 flow.c
*** flow.c	2001/08/21 05:06:51	1.467
--- flow.c	2001/08/22 08:11:26
*************** flow_find_cross_jump (mode, bb1, bb2, f1
*** 3484,3493 ****
       need to be compared for equivalence, which we'll do below.  */
  
    i1 = bb1->end;
!   if (onlyjump_p (i1))
      i1 = PREV_INSN (i1);
    i2 = bb2->end;
!   if (onlyjump_p (i2))
      i2 = PREV_INSN (i2);
  
    last1 = afterlast1 = last2 = afterlast2 = NULL_RTX;
--- 3484,3495 ----
       need to be compared for equivalence, which we'll do below.  */
  
    i1 = bb1->end;
!   if (onlyjump_p (i1)
!       || (returnjump_p (i1) && !side_effects_p (PATTERN (i1))))
      i1 = PREV_INSN (i1);
    i2 = bb2->end;
!   if (onlyjump_p (i2)
!       || (returnjump_p (i2) && !side_effects_p (PATTERN (i2))))
      i2 = PREV_INSN (i2);
  
    last1 = afterlast1 = last2 = afterlast2 = NULL_RTX;


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