BCT optimization

David Edelsohn dje@watson.ibm.com
Sun Sep 20 21:17:00 GMT 1998

>>>>> Jeffrey A Law writes:

Jeff> Yup.  That's the right fix, and one of the ones I'd done to a local
Jeff> tree, but never finished.  Similarly with the formatting stuff.  That
Jeff> work is getting rather old, but might be useful.  If you'd like I can
Jeff> send it (I didn't even bother to try and compile it at the time).

	When you have a chance, I wouldn't mind seeing the changes you
made.  I don't have a lot of time to devote to this, so I am not sure how
fast it will get done.

	The main thing I noticed is that the BCT stuff duplicates a lot of
code for computing a loop with a constant number of iterations -- and does
a worse job.  I am planning to rip that out and use loop_n_iterations for
loops whose iteration count can be pre-determined.  I am not going to
touch the runtime bounds stuff.  Using loop_n_iterations, I also can avoid
using the counter for loops that have too few iterations to be effective
and possibly allow an outer loop with more iterations utilize the

	Issues that I still need to understand are when loop_n_iterations
is valid.  Some loop parameters are stored in a vector based on loop id
and others, such as loop_n_iterations, are not.  Also, after unrolling,
how must one obtain the correct iteration count.

Thanks, David

More information about the Gcc mailing list