This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SRA: don't drop clobbers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]