[gomp4] remap variables inside gang, worker, vector and collapse clauses
Wed Sep 23 18:56:00 GMT 2015
On 09/23/2015 11:26 AM, Thomas Schwinge wrote:
> On Wed, 23 Sep 2015 10:57:40 -0700, Cesar Philippidis <email@example.com> wrote:
>> On 09/23/2015 10:42 AM, Cesar Philippidis wrote:
>> | Gang, worker, vector and collapse all contain optional arguments which
>> | may be used during loop expansion. In OpenACC, those expressions could
>> | contain variables
> I'm fairly sure that at least the collapse clause needs to be a
> compile-time constant?
Thanks, you're correct. I was looking at a user application and not the
spec when I made this change. I've applied this patch to fix that.
>> | but those variables aren't always getting remapped
>> | automatically. This patch remaps those variables inside lower_omp_loop.
> Shouldn't that be done in lower_rec_input_clauses? (Maybe I'm confused
> -- it's been a long time that I looked at this code.) (Jakub?)
I thought that lower_rec_input_clauses was for omp reductions and
firstprivate initialization? Variables ultimately get remapped when
omplower eventually calls gimple_regimplify_operands. That function uses
the value-expr to for remapping.
In this case, since lower_omp_for is responsible for GIMPLE_OMP_FOR
stmts, gimple_regimplify_operands doesn't get called on the clauses.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 482 bytes
Desc: not available
More information about the Gcc-patches