Dead Store Elimination

Jakub Jelinek jakub@redhat.com
Wed Oct 28 03:33:00 GMT 2009


On Thu, Oct 22, 2009 at 12:14:31PM -0500, Pranav Bhandarkar wrote:
> > Are you talking about the tree dead-store elimination pass or
> > the RTL one?  Basically *addr = value1; cannot be removed
> > if addr does not point to local memory or if the pointed-to
> > memory escapes through a call-site that is dominated by this store.
> 
> I am talking about the RTL dead-store elimination. In my case addr is
> based on the stack pointer and the store is to a local variable on the
> stack.

Just read the comments at the top of gcc/dse.c, it explains nicely what the
pass performs.  fp based stores are removed even when they are dead when
reaching end of function, sp based stores are not, because it would break
too much architectures.

	Jakub



More information about the Gcc mailing list