This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: SRA: don't drop clobbers
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, Alexandre Oliva <aoliva at redhat dot com>
- Cc: Marc Glisse <marc dot glisse at inria dot fr>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 10 Jul 2014 17:01:38 +0200
- Subject: Re: SRA: don't drop clobbers
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1406282350110 dot 31815 at stedding dot saclay dot inria dot fr> <alpine dot DEB dot 2 dot 02 dot 1406300119080 dot 8326 at stedding dot saclay dot inria dot fr> <CAFiYyc2WJ4y=o=Y4jLFHPSKo+5g7EcU-cfNqXOX-vxfU9N6=9A at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jul 10, 2014 at 04:54:53PM +0200, Richard Biener wrote:
> > + else if (access->grp_to_be_debug_replaced)
> > + {
>
> Why would we care to create clobbers for debug stmts?! Are those
> even valid?
It is not valid. Though, the fields supposedly live nowhere after the
clobber, so perhaps one could use
GIMPLE_DEBUG_BIND_NOVALUE instead of the clobber in the
gimple_build_debug_bind call, and drop the previous two lines.
Not sure if it is desirable though, it might cause the debug info to say
something is unavailable even if it still lives in some register or memory
for a few extra instructions.
Alex, what do you think?
> > + tree rep = get_access_replacement (access);
> > + tree clobber = build_constructor (access->type, NULL);
> > + TREE_THIS_VOLATILE (clobber) = 1;
> > + gimple ds = gimple_build_debug_bind (rep, clobber, gsi_stmt (*gsi));
> > +
> > + if (insert_after)
> > + gsi_insert_after (gsi, ds, GSI_NEW_STMT);
> > + else
> > + gsi_insert_before (gsi, ds, GSI_SAME_STMT);
> > + }
> > +
> > + for (child = access->first_child; child; child = child->next_sibling)
> > + clobber_subtree (child, gsi, insert_after, loc);
> > +}
> > +
Jakub