This is the mail archive of the gcc@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: Loop distribution for nested Loops.


On Tue, Aug 4, 2015 at 4:04 PM, Ajit Kumar Agarwal
<ajit.kumar.agarwal@xilinx.com> wrote:
>
> All:
>
> For the Loop given in Fig(1), there is no possibility of loop distribution because of the dependency of S1 and S2 on the outerloop index k.
> Due to the dependency the Loop cannot be distributed.
>
> The Loop can be distributed with the transformation given in Fig(2) where the loop given in Fig(1) is distributed due to the dependency
> Hoisting transformation. The Dependency hoisting transformation where the dependency is shifted to insertion of new outer Loop and the
> Dependency is based on the inserted outerloop.  This makes the loop k(S1) and j(S2) distributed with the insertion of new outerloop and transfer
> The dependency  of S1  and S2 to the inserted outer loop.
>
> Do k = 1, n-1
>   Do I = k+1, n
>
> S1:  a(I,k) = a(I,k)/a(k,k)
>
>   Enddo
>   Do j = k+1,n
>      Do I = k+1,n
>   S2:  a(I,j) = a(I,j) - a(I,k) *a(k,j);
>      Enddo
>    Enddo
> Enddo
>
> Fig(1)
>
> Do x = 1, n
>    Do k = 1, x-1
>       Do I = k+1, n
>
> S2:     a(I,x) = a(I,x) - a(I,k) * a(k,x)
>
>       Enddo
>    enddo
>   Do i = x+1,n
>      S1:  a(I,x) = a(I,x)/a(x,x);
>    Enddo
> Enddo
>
> Fig(2).
>
> The above transformation looks interesting making the candidate of loop distribution of nested loops with the presence of dependency by
> Shifting the dependency to new inserted outer loop.
>
> It is useful to have dependency hoisting transformation that makes the loop distribution possible for nested loops
>
> My question is  the partitioning based Loop distributed transformation does the distribution of the nested Loops?

No, the patch implementing it
(https://gcc.gnu.org/ml/gcc-patches/2013-09/msg01293.html - maybe that
wasn't the latest version)
was never applied.

Richard.

> Thanks & Regards
> Ajit
>
>
>
>
>


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