This is the mail archive of the
mailing list for the GCC project.
Reduction Pattern ( Vectorization or Parallelization)
- From: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
- To: "law at redhat dot com" <law at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Cc: 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: Sun, 5 Jul 2015 11:57:54 +0000
- Subject: Reduction Pattern ( Vectorization or Parallelization)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 22.214.171.124) smtp.mailfrom=xilinx.com; gcc.gnu.org; dkim=none (message not signed) header.d=none;
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.
Thanks & Regards