On 05/22/2013 09:37 AM, Iyer, Balaji V wrote:
Furthermore, do you want to generate just normal loop out of it, or
shouldn't we generate a #pragma omp simd loop out of it instead?
Haven't read the spec if array notation guarantees lack of
forward/backward loop dependencies and what are the restrictions on
the calls you can do inside of array notation. Perhaps the
lowering to normal vs. simd loop could depend on whether all called
functions in the expression are elemental.
What you mentioned is a good performance optimization. It is
something I have planned to do in future. But, the spec does not
require the loop (or array notation expansion) to be vectorized.
So if we can represent array notation as an OpenMP SIMD loop and re-use
the OpenMP code generation, that's a significant win. I realize the
OpenMP SIMD stuff is still in-progress, but from a design standpoint
we'd like to separate out the front-end issues from the code generation
issues -- with the goal being that we can re-use the OpenMP SIMD path to
also handle Cilk SIMD & Cilk array notation and possible bits of OpenACC.
Balaji, how feasible is it to rewire the code generation aspects of the
array notation patch to instead feed into the OpenMP SIMD bits Jakub is
working on?
Jeff