Loop clean up

Jeffrey A Law law@cygnus.com
Tue Jan 4 22:17:00 GMT 2000

  In message <14406.3096.719263.523747@ongaonga.elec.canterbury.ac.nz>you write
  > [I seem to be having mail delivery problems, so apologies if you've
  > already received this patch...]
  > Here are the patches for stage 1 of my clean up of the loop optimiser.
  > This just replaces many of the global arrays with entries in a
  > structure for each loop and tidies up some of the function parameters.
  > If these patches are OK, I'll submit stage 2 which removes many of the 
  > remaining side effects and paves the way for utilising the CFG derived
  > natural loop information.
  > Michael.
  > 1999-12-01  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
  > 	* loop.c (this_loop_info): Delete.
  > 	(uid_loop): Add in place of uid_loop_num.  All uses updated.
  >  	(loop_number_exit_count): Delete and replace with entry in loop
  > 	structure.  All uses updated.
  > 	(loop_number_loop_starts, loop_number_loop_ends): Likewise.
  > 	(loop_number_loop_cont, loop_number_cont_dominator): Likewise.
  > 	(loop_outer_loop): Likewise.
  > 	(loop_invalid, loop_number_exit_labels): Likewise.
  > 	(loop_used_count_register): Delete and replace with entry in 
  > 	loop_info structure.
  > 	(find_and_verify_loops): Add loops argument.
  > 	(verify_dominator, mark_loop_jump, prescan_loop): Replace loop_start,
  > 	loop_end, etc. arguments with loop structure pointer.  All callers
  > 	changed.
  > 	(loop_reg_used_before_p, scan_loop, strength_reduce): Likewise.
  > 	(check_dbra_loop, next_insn_in_loop, try_copy_prop): Likewise.
  > 	(load_mems_and_recount_loop_regs_set, load_mems): Likewise.
  > 	(insert_bct): Likewise.
  > 	(basic_induction_var): New argument level.
  > 	* loop.h (struct loop_info): Delete fields num, loops_enclosed,
  > 	vtop, and cont.  Add used_count_register.
  > 	(uid_loop): Delete declaration.
  >  	(loop_number_exit_count): Likewise.
  > 	(loop_number_loop_starts, loop_number_loop_ends): Likewise.
  > 	(loop_number_loop_cont, loop_number_cont_dominator): Likewise.
  > 	(loop_outer_loop, loop_used_count_register): Likewise.
  > 	(loop_invalid, loop_number_exit_labels): Likewise.
  > 	(unroll_loop): Replace loop_start and loop_end arguments
  >  	with loop structure pointer.
  > 	(loop_precondition_p, loop_iterations): Likewise.
  > 	* unroll.c: Include basic-block.h.
  >  	(unroll_loop): Replace loop_start and loop_end arguments
  >  	with loop structure pointer.
  > 	(loop_precondition_p, loop_iterations): Likewise.
  > 	* basic-block.h (struct loop): New entries vtop, cont,
  >  	cont_dominator, start, end, top, scan_start, exit_labels,
  > 	exit_count.  
  > 	* Makefile.in (unroll.o): Add BASIC_BLOCK_H to dependencies.
This is fine.  Though it will need some minor updating due to random changes
(mostly in loop.c) since you originally submitted the patch.  

Cnosider it pre-approved once you update it to work with the current


More information about the Gcc-patches mailing list