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: Unreviewed patches


Hello,

> > http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02505.html
> > 	-- improves store motion to do also dead store elimination
> 
> I think this patch is very reasonable.  Approved.
> 
> Do you find that this completely subsumes the current 
> dead-store elimination?  I.e. if you annotate the flow.c
> code, how many hits does it find?

it does not subsume it completely (in fact it is almost orthogonal,
as it takes care of globally dead stores, while flow.c concerns locally
dead ones).  More precisely:

1) It does not do the removal in the last block.  I have an improved version
   of the patch that also splits the edges to exit, thus achieving the
   removal there as well (it also fixes another small bug in the patch).
   I will test it and send it tomorrow.
2) flow.c uses the fact that write can be killed by a write to the
   same address but in wider mode
3) store motion will only kill available dead stores, i.e. the stores
   local to a basic block and read, nontrivially stored or having
   address modified later in it are not removed

2) and 3) could only be handled by a mechanism similar to the one in
flow.c, so it does not seem feasible to me to get rid of it.

Zdenek


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