GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)

Thomas Schwinge thomas@codesourcery.com
Wed Dec 18 20:03:00 GMT 2013


Hi!

This one's owed to me still learning about GCC internals; if someone
could please be so kind to poit me to the appropriate documentation, or
explain:

On Mon, 16 Dec 2013 16:38:18 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> The reason for 3 separate arrays is that some of the values
> are always variable, some are sometimes variable (sizes), some are
> never variable (alignment + kind).

Related to this, in gcc/omp-low.c:lower_omp_target, I see:

          tree clobber = build_constructor (ctx->record_type, NULL);
          TREE_THIS_VOLATILE (clobber) = 1;
          gimple_seq_add_stmt (&olist, gimple_build_assign (ctx->sender_decl,
                                                            clobber));

I'm assuming the point of this clobber is to tell the compiler (because
it can't figure this out on its own?) that afterwards, after the
gimple_seq olist has been "executed", we're not going to use the
ctx->sender_decl object anymore, right?  What would happen if this
clobber were not added?  Missed optimizations due to the object being
kept alive, or correctness issues, or something else?

And, why doesn't the same also need to be done for the sizes object (in
the non-static case)?


Grüße,
 Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 489 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20131218/84b7466f/attachment.sig>


More information about the Gcc-patches mailing list