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: Loop optimization



  In message <199901101222.MAA09123@phal.cygnus.co.uk>you write:
  > > Jeffrey A Law writes:
  > > 
  > >  > Further down the road, the loop optimizer should be moving towards nat
  > ural
  > >  > loop analysis to determine what loops to optimize instead of relying o
  > n hints
  > >  > provided by the front-ends.
  > 
  > If you mean detecting loops that have been built with gotos, that
  > defeats code that on putpose avoids explicit loop constructs because
  > it 'knows' that the loop is executed close to a single time (or even
  > close to zero times) on average.
I mean this and a variety of other things.  Consider java which builds loops
in this manner.

Also note that detecting these loops doesn't mean we actually will be able to
optimize them, the loop optimizer still has to look for bivs, givs loop bounds,
etc etc etc.

We are going in this direction long term.  Sorry if you don't like it, but it
is the right way to do loop optimizations.

jeff


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