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: New size optimization



  In message <199803302250.XAA27657@phal.cygnus.co.uk>you write:
  > Invariant code motion in general adds extra moves and register pressure.
  > AFAIK there are no common scenarios where it can be a precursor for
  > another optimization that leads to a code size saving.  Thus, I think it
  > should be turned off when optimizing for space.
Sure it can -- moving an invariant out of a loop may expose it to
local optimizations in the block before the loop (cse, combine, etc).

I'm not saying disabling loop invariant code motion is the wrong 
thing to do when optimizing for size -- it's just not as cut and
dried as you made it seem to be.

jeff


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