This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, SMS 2/3] Skip DEBUG_INSNs while recognizing doloop


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.

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)
         {

Revital


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]