public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Dead Store Elimination
@ 2009-10-22  6:57 Pranav Bhandarkar
  2009-10-22 17:13 ` Richard Guenther
  0 siblings, 1 reply; 5+ messages in thread
From: Pranav Bhandarkar @ 2009-10-22  6:57 UTC (permalink / raw)
  To: gcc

Hi,

A possible silly question about the dead store elimination pass. From
the documentation it is clear that the store S1 below is removed by
this pass (in dse.c)

*(addr) = value1;          // S1
.....
.....
*(addr) = value2          // S2 .. No read of "addr" between S1 and S2.
......
             = *(addr)       // Load
.......
end_of_the_function

However, consider a different example.

*(addr) = value1;      // S1
......
.....
end_of_the_function.

i.e. there is no store Sn that follows S1 along any path from S1 to
the end of the function and there is no read of addr following S1
either. Is the dse pass expected to remove such stores ? (I am
inclined to think that it should, but I am seeing a case where dse
doesnt remove such stores) . Further is the behaviour expected to be
different if the "addr" is based on  "fp" ?

TIA,
Pranav

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-10-27 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-22  6:57 Dead Store Elimination Pranav Bhandarkar
2009-10-22 17:13 ` Richard Guenther
2009-10-22 18:03   ` Pranav Bhandarkar
2009-10-22 18:26     ` Jeff Law
2009-10-28  3:33     ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).