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: RFA: New optimization: Convert local statics into non-statics


On Mon, Jul 21, 2008 at 10:49 AM, Nathan Froyd <froydnj@codesourcery.com> wrote:
> I don't think there's a lot of extra benefit.  In the example above, the
> wins of the optimization over PRE are:
>
> - We avoid the store to r; r becomes a normal local variable and we
>  simply (after forward-propagation) find it to be dead;
>
> - We don't allocate .bss space for r.

I mentioned what needs to be done after PRE was fixed with respect of
DCE.  We need a special IPA DCE which tries to see if a local global
variable is only stored to and then remove the stores.  With the
removal of the store, the variable pool will then do its work and
remove allocation.  We can do this with a simple IPA pass.  I can
write it if needed.  It is better than doing a "promotion pass" as it
only tries to do one thing instead of multiple at the same time.

Thanks,
Andrew Pinski


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