This is the mail archive of the gcc@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]

Re: random thought - optimizer


  In message <20010701194819.I18369@stanford.edu>you write:
  > My question is, what sort of analysis would it take to recognize this
  > condition?  I'm aware that optimizing this function is somewhat silly,
  > but I'd think that noticing when a static variable can have no effect
  > on the output of a program, might be worthwhile in more places than this.
*If* you could prove that a particular MEM is local, then it would be
trivial for the SSA dead code elimination to do this.  All it would have
to do is not mark the store as important during the initial scan for 
important instructions.

Similarly, we would like to be able to detect stores into the local frame
distinctly from those in the outgoing argument space so that we can perform
this kind of optimization on local automatic memory.

The trick (of course) is proving the MEM is local and not aliased.
jeff



jeff


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