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]

[PATCH][modulo-sched] Fix generation of prolog and epilog


Hello,

Alexander Monakov reported on this bug while testing the export ddg patch
(http://gcc.gnu.org/ml/gcc/2007-12/msg00240.html). The generation of the
prolog and epilog is done by coping each insn from the kernel. In fact,
when coping an insn we actually copy a chain of insns which contains
also all the notes which precede the insn.  The problem was exposed when
reg-moves were created in the kernel inside that chain; before generating
the prolog and epilog; which caused a redundant copy of reg-moves in the
prolog/epilog (one was copied from the kernel and one was generated for
the prolog/epilog).  This may cause a problem when there is more than
one reg-move generated for some insn (as the order of generating the
reg-moves is different for prolog/epilog).
The patch also adds dump info.

Tested on ppc, SPU, x86 with no new regressions.

OK for mainline?

:ADDPATCH modulo-sched:

Thanks,
Revital


2007-12-16  Alexander Monakov  <amonakov@ispras.ru>
            Revital Eres  <eres@il.ibm.com>

        * modulo-sched.c (duplicate_insns_of_cycles): Avoid coping
        reg-moves that were created for the body of the loop when
        generating the prolog or the epilog.
        (loop_canon_p): Add dump info.
        (sms_schedule): Likewise.

testsuite:

        * gcc.dg/sms-5.c: New testcase.


(See attached file: patch_fix_prolog.txt)(See attached file: sms-5.txt)

Attachment: patch_fix_prolog.txt
Description: Text document

Attachment: sms-5.txt
Description: Text document


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