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] Revisit order of insns within a row


Hello,

When two dependent insns are scheduled in the same row; which is the
first/last row of their scheduling window; they are currently ordered
according to their dependency (i.e. if x -> y then x will precede y in
the row).

The following example demonstrates why imposing an order on two dependent
insns based on the fact that they are scheduled in the same row is a
conservative approach:

Consider the following two insns which are scheduled in the same cycle C
(and thus in the same row):

insn 1) a[i+2] = rhs
insn 2) lhs = a[i]

The producer of insn 2 is insn a[i] = rhs which appears in cycle:
C - 2 * II.  Thus the order of insn 1 and insn 2 in the row is
not important.

The attached patch changes this approach by imposing an order between two
dependent insns only if the producer and the consumer are been scheduled
in the same cycle (and thus in the same row).  This happens when the
latency between them is zero.

Tested on powerpc64-linux and SPU. OK for 4.4?

:ADDPATCH modulo-sched:

Thanks,
Revital


2007-12-30  Ayal Zaks  <zaks@il.ibm.com>
            Revital Eres  <eres@il.ibm.com>).

        * modulo-sched.c (calculate_must_precede_follow): Address TODO
        regarding the order of two dependent insns in the same row.

(See attached file: patch_27_12_todo.txt)

Attachment: patch_27_12_todo.txt
Description: Text document


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