Loop optimizer patch

Ulrich Weigand weigand@i1.informatik.uni-erlangen.de
Fri Feb 6 19:48:00 GMT 2004


Mark Mitchell wrote:

> I think so.  We really don't want quadratic behavior in the compiler, 
> except where absolutely necessary.  Sometimes you can't get really get 
> around it, but I'm not familiar enough with the code to which you're 
> referring to know whethere we should be bounding those other cases or 
> not.  You can pick a bigger value than 5 if you want for the default, 
> but I think there should be a bound.

What I was trying to say is that for every call to force_movables,
there is always also a call to ignore_some_movables, combine_movables, 
and in most cases also move_movables; and all of these routines are
already quadratic in the number of movables (with a larger constant
at that).  And in fact, even in force_movables itself, just before
the code I added, there is a loop which is quadratic in the number
of movables.

It just seems a bit silly to me to bother with a bound only in just 
this one loop (and in the one that usually has the shortest run time 
of all of them anyway) ...

If there is really a compile-time concern, IMO this should be addressed
at a higher level, e.g. by having a bound on the number of movables
considered per loop.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de



More information about the Gcc-patches mailing list