OSDN Git Service

Skip DEBUG_INSNs while recognizing doloop
authorrevitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 May 2011 07:40:26 +0000 (07:40 +0000)
committerrevitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 11 May 2011 07:40:26 +0000 (07:40 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173647 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/modulo-sched.c

index 1ea9d00..60e7c76 100644 (file)
@@ -1,5 +1,10 @@
 2011-05-11  Revital Eres  <revital.eres@linaro.org>
 
+       * modulo-sched.c (doloop_register_get): Ignore DEBUG_INSNs while
+       recognizing doloop.
+
+2011-05-11  Revital Eres  <revital.eres@linaro.org>
+
        * loop-doloop.c (doloop_condition_get): Use prev_nondebug_insn
        instead of PREV_INSN.
 
index 091c005..0f525af 100644 (file)
@@ -310,10 +310,10 @@ doloop_register_get (rtx head ATTRIBUTE_UNUSED, rtx tail ATTRIBUTE_UNUSED)
      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)
         {