PowerPC reusing CTR register for nested loops

Jeffrey A Law law@cygnus.com
Sat Sep 12 12:57:00 GMT 1998


  In message < 9809112016.AA50330@marc.watson.ibm.com >you write:
  > 	Only trying to insert the loop instructions using the CTR register
  > during *one* of the loop optimization passes works *much* better :^).
:-)


  > 	Do you have a feel for whether the BCT instruction should be
  > attempted on the first call to loop_optimize() or the second one when it
  > is called twice?  Currently I am trying to insert the instruction only on
  > the second call to loop_optimize() which does not depend on
  > rerun_loop_opt.  Would it be better to try to inserting BCT during the
  > first call to loop_optimize() *if* rerun_loop_opt is enabled and during
  > the second unconditional call to loop_optimize() only if the first one is
  > skipped?
I think it makes the most sense to insert BCTs on the last loop pass.
(ie the second pass if we're running loop twice, or the only pass if
we're running loop once).

I doubt it makese all that much difference, but the actions of the
first loop pass may clean things up enough that the second loop
pass may see more opportunities for BCT.

Just a gut feeling.  Might be worth experimenting.

jeff



More information about the Gcc-bugs mailing list