This is the mail archive of the
mailing list for the GCC project.
Re: Reduction Pattern ( Vectorization or Parallelization)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
- Cc: "law at redhat dot com" <law at redhat dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Vinod Kathail <vinodk at xilinx dot com>, Shail Aditya Gupta <shailadi at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, Nagaraju Mekala <nmekala at xilinx dot com>
- Date: Thu, 16 Jul 2015 12:53:17 +0200
- Subject: Re: Reduction Pattern ( Vectorization or Parallelization)
- Authentication-results: sourceware.org; auth=none
- References: <37378DC5BCD0EE48BA4B082E0B55DFAA41F414A1 at XAP-PVEXMBX02 dot xlnx dot xilinx dot com>
On Sun, Jul 5, 2015 at 1:57 PM, Ajit Kumar Agarwal
> The scalar and array reduction patterns can be identified if the result of commutative updates
> Is applied to the same scalar or array variables on the LHS with +, *, Min or Max. Thus the reduction pattern identified with
> the commutative update help in vectorization or parallelization.
> For the following code
> For(j = 0; j <= N;j++)
> y = d[j];
> For( I = 0 ; I <8 ; i++)
> X(a[i]) = X(a[i]) + c[i] * y;
> For the above code with the reduction pattern on X with respect to the outer loop exhibits the commutative updates on + can be identified
> In gcc as reduction pattern with respect to outer loops. I wondering whether this can be identified as reduction pattern which can reduce to vectorized
> Code because of the X is indexed by another array as thus the access of X is not affine expression.
> Does the above code can be identified as reduction pattern and transform to the vectorized or parallelize code.
I think the issue here is dependences of X(A[i]) as A[i] might be the same
for different i.
> Thanks & Regards