> OK for mainline? Yes, this is pretty obvious. (You don't have to change to prev_nondebug_insn btw).
Ayal. From: Revital Eres <revital.e...@linaro.org> To: Ayal Zaks/Haifa/IBM@IBMIL Cc: gcc-patches@gcc.gnu.org, Patch Tracking <patc...@linaro.org> Date: 08/05/2011 07:37 AM Subject: [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop Hello, The attached patch adds code to skip DEBUG_INSNs while recognizing doloop pattern. 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: * modulo-sched.c (doloop_register_get): Ignore DEBUG_INSNs while recognizing doloop. Index: modulo-sched.c =================================================================== --- modulo-sched.c (revision 173368) +++ modulo-sched.c (working copy) @@ -310,10 +313,10 @@ doloop_register_get (rtx head ATTRIBUTE_ either a single (parallel) branch-on-count or a (non-parallel) branch immediately preceded by a single (decrement) insn. */ first_insn_not_to_check = (GET_CODE (PATTERN (tail)) == PARALLEL ? tail - : PREV_INSN (tail)); + : prev_nondebug_insn (tail)); for (insn = head; insn != first_insn_not_to_check; insn = NEXT_INSN (insn)) - if (reg_mentioned_p (reg, insn)) + if (reg_mentioned_p (reg, insn) && !DEBUG_INSN_P (insn)) { if (dump_file) {