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: [PING][patch][modulo-sched] Fix order params calculation


Revital1 Eres/Haifa/IBM wrote on 19/02/2008 09:49:31:

> Hello,
>
> http://gcc.gnu.org/ml/gcc-patches/2008-01/msg01065.html
>
> Thanks,
> Revital

> Hello,
>
> The following patch contains a fix to the calculation of the order params
> in case of latency zero.
>
> It is currently bootstrapped and tested on ppc and SPU.
>
> OK for mainline once testing completes?
>

OK.
Please add the explanation/testcase why this fix is needed -- we want the
ASAP/ALAP/HEIGHT parameters to maintain the direction of dependencies,
including those having zero latency.

Ayal.


> :ADDPATCH modulo-sched:
>
> Thanks,
> Revital
>
> 2008-01-23  Ayal Zaks  <zaks@il.ibm.com>
>
>         * modulo-sched.c (calculate_order_params): Fix calculate of
>         order params.
>
>
> Index: modulo-sched.c
> ===================================================================
> --- modulo-sched.c      (revision 131717)
> +++ modulo-sched.c      (working copy)
> @@ -2174,7 +2174,7 @@
>        for (e = u_node->in; e; e = e->next_in)
>         if (e->distance == 0);
>           ASAP (u_node) = MAX (ASAP (u_node),)
> -                              ASAP (e->src) + e->latency);
> +                              ASAP (e->src) + e->latency + 1);
>        max_asap = MAX (max_asap, ASAP (u_node));
>      }
>
> @@ -2188,9 +2188,9 @@
>         if (e->distance == 0)
>           {
>             ALAP (u_node) = MIN (ALAP (u_node),;
> -                                ALAP (e->dest) - e->latency);;
> +                                ALAP (e->dest) - e->latency - 1);
>             HEIGHT (u_node) = MAX (HEIGHT (u_node),
> -                                  HEIGHT (e->dest) + e->latency);
> +                                  HEIGHT (e->dest) + e->latency + 1);
>           }
>      }
>    if (dump_file)
>
>
> Thanks,
> Revital


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