This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
cross jump buglet
- To: gcc-patches at gcc dot gnu dot org
- Subject: cross jump buglet
- From: Richard Henderson <rth at redhat dot com>
- Date: Wed, 22 Aug 2001 01:15:41 -0700
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;