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

Reply via email to