Re: [gnu-linaro-tools] Re: -fremove-local-statics optimization

2010-08-02 Thread Mark Mitchell
Ulrich Weigand wrote: > Andrew Stubbs wrote: > >> Some discussion later, they decided it would be better to implement the >> optimization using inter-procedural dead store analysis: >>http://gcc.gnu.org/ml/gcc-patches/2008-07/msg01602.html > > I agree that this would be a much nicer way ...

Re: -fremove-local-statics optimization

2010-08-02 Thread Ulrich Weigand
Andrew Stubbs wrote: > Some discussion later, they decided it would be better to implement the > optimization using inter-procedural dead store analysis: >http://gcc.gnu.org/ml/gcc-patches/2008-07/msg01602.html I agree that this would be a much nicer way ... > This doesn't seem to have actu

Re: -fremove-local-statics optimization

2010-08-02 Thread Andrew Stubbs
On 29/07/10 17:23, Andrew Stubbs wrote: > So basically we're left with this patch that does something we want, but > not in a way that can go upstream. :( > > The question is, should I merge this to Linaro, or not? Loic and I > agreed to hold off until I'd done a bit more research and/or tried to >

Re: -fremove-local-statics optimization

2010-07-29 Thread Andrew Stubbs
On 29/07/10 17:23, Andrew Stubbs wrote: > This patch was originally submitted, by RedHat, to gcc-patches here: > http://gcc.gnu.org/ml/gcc-patches/2008-07/subjects.html#00982 Joseph points out, the patch we have in our tree is not actually the same one posted in the link above. Our patch is a dif

-fremove-local-statics optimization

2010-07-29 Thread Andrew Stubbs
As already discussed with Loic, CodeSourcery have a GCC patch that implements a new optimization: -fremove-local-statics. Essentially, it transforms code like this: int foo (void) { static int a = 1; return a; } into this: int foo (void) { int a = 1; return a; } Admittedly, if the c