Patchwork [SMS,3/3] Skip DEBUG_INSN in loop-doloo​​​​p.

login
register
mail settings
Submitter Revital1 Eres
Date May 8, 2011, 5:02 a.m.
Message ID <OFCBC2816B.0BE2BBC3-ONC225788A.001B4A13-C225788A.001BB6F8@il.ibm.com>
Download mbox | patch
Permalink /patch/94541/
State New
Headers show

Comments

Revital1 Eres - May 8, 2011, 5:02 a.m.
Hello,

(sorry for multiple copies of this email)

This small fix was inserted to skip DEBUG_INSNs while
recognizing doloop pattern in loop-doloop.c file.  It's a fix
for the already approved do-loop patch (not in mainline yet,
http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01718.html) in loop-doloop.c

The patch was tested together with the rest of the patches in this series
and on top of the patch to support do-loop for ARM (not yet in mainline,
but approved http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01718.html).
On ppc64-redhat-linux regtest as well as bootstrap with SMS flags
enabling SMS also on loops with stage count 1.  Regtested on SPU.
On arm-linux-gnueabi regtseted on c,c++. Bootstrap c language with SMS
flags enabling SMS also on loops with stage count 1.

OK for mainline?

Thanks,
Revital

Changelog:

   * loop-doloop.c (doloop_condition_get): Use prev_nondebug_insn
      instead of PREV_INSN.

Patch

--- loop-doloop.c       2011-05-07 16:08:27.000000000 +0300
+++ loop-doloop_new.c   2011-05-07 16:07:48.000000000 +0300
@@ -151,7 +151,7 @@  doloop_condition_get (rtx doloop_pat)
         inc = XVECEXP (PATTERN (prev_insn), 0, 1);
       }
      else
-        inc = PATTERN (PREV_INSN (doloop_pat));
+        inc = PATTERN (prev_insn);
      /* We expect the condition to be of the form (reg != 0)  */
      cond = XEXP (SET_SRC (cmp), 0);
      if (GET_CODE (cond) != NE || XEXP (cond, 1) != const0_rtx)