Hello,

> > Using testsuite/gcc.dg/sms-6.c as an example and compiling it for
> PowerPC,
> > node 18 (see attachment) is in a SCC and cannot be scheduled until
> spliting
> > twice. The MII = 20 and the schedule can only  be found at II = 24.
>
> Yes, I see. This example raises a couple of issues:
>
> o The first row split (from II=20 to II=21) is miscalculated; it should
be
> row 20=0 instead of 19. Splitting row 19 cannot help schedule node 18,
and
> indeed we immediately split another row. We're now checking a small patch
> to fix this, which should save one cycle of II in the above example.

Here is the patch, on behalf of Ayal.
Passed bootstrap + regtest with SMS flags on ppc64 and bootstrap +
regtest x86.

I'll commit it later today to trunk if that's OK.

Thanks,
Revital

        * modulo-sched.c (sms_schedule_by_order): Pass the actual
        schedulable rows to compute_split_row.

(See attached file: patch_sms_12_3.txt)
Index: modulo-sched.c
===================================================================
--- modulo-sched.c      (revision 144739)
+++ modulo-sched.c      (working copy)
@@ -1833,10 +1833,10 @@ sms_schedule_by_order (ddg_ptr g, int mi
 
               num_splits++;
               if (step == 1)
-                split_row = compute_split_row (sched_nodes, start, end,
+                split_row = compute_split_row (sched_nodes, start, end - 1,
                                                ps->ii, u_node);
               else
-                split_row = compute_split_row (sched_nodes, end, start,
+                split_row = compute_split_row (sched_nodes, end + 1, start,
                                                ps->ii, u_node);
 
               ps_insert_empty_row (ps, split_row, sched_nodes);

Reply via email to