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 09:29:21PM +0200, Jan Hubicka wrote:
> If we was able to do load+store PRE as early optimization (I would love
> to, but we would need alias analysis working at that stage), then we
> might just add simple pas for removal of write only static vars at IPA
> level to catch this case in more generic matter.

One of the things we thought about doing was making this pass an actual
IPA pass so we could detect cases where X is a static variable in F, and
F only calls G which can never call back into F -> X can be made a
non-static variable.  (X can still be made a non-static local variable
as things stand right now--it depends on where G is called relative to
defs and uses of X.)  But it wasn't clear how much this would buy us
other than warm fuzzies of completeness.

-Nathan


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