This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, PR43920, 4/9] Cross-jumping - Don't count use or clobber.
Currently uses and clobbers are counted as insns in crossjumping, which
can cause undesirable crossjumping. The patch fixes this.
Thanks,
- Tom
Index: gcc/cfgcleanup.c
===================================================================
--- gcc/cfgcleanup.c (revision 170556)
+++ gcc/cfgcleanup.c (working copy)
@@ -1074,6 +1074,7 @@ flow_find_cross_jump (basic_block bb1, b
{
rtx i1, i2, last1, last2, afterlast1, afterlast2;
int ninsns = 0;
+ rtx p1;
/* Skip simple jumps at the end of the blocks. Complex jumps still
need to be compared for equivalence, which we'll do below. */
@@ -1122,7 +1123,9 @@ flow_find_cross_jump (basic_block bb1, b
afterlast1 = last1, afterlast2 = last2;
last1 = i1, last2 = i2;
- ninsns++;
+ p1 = PATTERN (i1);
+ if (!(GET_CODE (p1) == USE || GET_CODE (p1) == CLOBBER))
+ ninsns++;
}
i1 = PREV_INSN (i1);