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 2/2] Fix scheduling order within a row


Hello,

This patch tried to fix a problem described in:
http://gcc.gnu.org/ml/gcc/2007-11/msg00295.html.  The problem is
related to a broken anti-deps caused by a bug in the calculation
of must_follow/must_precede bitmaps.  This patch tries to fix this
problem by calculating must_follow/must_precede bitmaps based on the
step variable which indicates the direction we walk on the schedualing
window rather than directly from start and end rows which are the first
and last boundaries of the window.

Bootstrapped and tested together with the previous patch (1/2) on ppc,
SPU and x86 with no new regressions.

OK for mainline?

Thanks,
Revital

2007-11-20  Ayal Zaks  <zaks@il.ibm.com>
            Revital Eres  <eres@il.ibm.com>

        * modulo-sched.c (calculate_must_precede, calculate_must_follow,
        node_can_be_scheduled_in_row_p): New functions.
        (sms_schedule_by_order): Call the new functions.  Peel the first
        and last iterations of the loop which finds the first empty row
        in the scheduling window to schedule a new node.
        (ps_insn_find_column): Use must_follow and must_precede only if
        they are not NULL.
        (ps_insn_advance_column): Likewise.


testsuite:

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


(See attached file: sms-4.c.txt)(See attached file: patch_fix_order_18.txt)

Attachment: sms-4.c.txt
Description: Text document

Attachment: patch_fix_order_18.txt
Description: Text document


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