Patchwork [SMS,2/3] Skip DEBUG_INSNs while recognizing doloop

login
register
mail settings
Submitter Revital Eres
Date May 12, 2011, 6:54 a.m.
Message ID <BANLkTin6dENgdwWPnX1FF59m9zko+DoLxg@mail.gmail.com>
Download mbox | patch
Permalink /patch/95270/
State New
Headers show

Comments

Revital Eres - May 12, 2011, 6:54 a.m.
Hello,

>> +    if (reg_mentioned_p (reg, insn) && !DEBUG_INSN_P (insn))
>
> It probably makes sense to test for !DEBUG_INSN_P first, since it's much
> cheaper.

Thanks, will commit the following to fix that:

        * modulo-sched.c (doloop_register_get): Check !DEBUG_INSN_P
         first.


Revital

Patch

Index: modulo-sched.c
===================================================================
--- modulo-sched.c      (revision 173693)
+++ modulo-sched.c      (working copy)
@@ -316,7 +316,7 @@  doloop_register_get (rtx head ATTRIBUTE_
                              : prev_nondebug_insn (tail));

   for (insn = head; insn != first_insn_not_to_check; insn = NEXT_INSN (insn))
-    if (reg_mentioned_p (reg, insn) && !DEBUG_INSN_P (insn))
+    if (!DEBUG_INSN_P (insn) && reg_mentioned_p (reg, insn))
       {
         if (dump_file)
         {