On Wed, Dec 18, 2013 at 09:03:40PM +0100, Thomas Schwinge wrote:
> 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 <ja...@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));

Clobber stmt is an artificial statement that tells various optimization
passes that the decl is dead at that point, so e.g. DSE can remove stores
to the decl only followed by the clobber, or cfgexpand automatic variable
layout code can be able to better share stack slots for variables that
aren't live concurrently.

It is purely optimization thing right.  Given that the address of the
object is passed to some other function, it might help the compiler to find
out that the function doesn't remember that address somewhere, making the
object live for longer than it is.

        Jakub

Reply via email to