Reducing number of arrays used by reload

Jeffrey A Law
Thu Jan 7 00:57:00 GMT 1999

  In message < >you writ
  > Here's the patch I mentioned the other day to collect the
  > plethora of arrays used by reload into an array of structures.
  > Michael.
  > Mon Jan  4 22:44:26 1999  Michael Hayes  <>
  > 	* reload.h (struct reload_info): New structure definition.
  > 	* reload.c (reloads): New array.
  > 	(reload_in, reload_out, reload_regclass, reload_inmode,
  > 	reload_outmode, reload_reg_rtx, reload_optional, reload_nongroup,
  > 	reload_inc, reload_in_reg, reload_out_reg, reload_nocombine,
  > 	reload_opnum, reload_when_needed, reload_secondary_p,
  > 	reload_secondary_in, reload_secondary_out, 
  > 	reload_secondary_in_icode, reload_secondary_out_icode,
  > 	reload_mode, reload_nregs, reload_inherited, reload_inheritance_insn,
  > 	reload_override_in, reload_spill_index): Replaced arrays by 
  > 	reloads array of struct reload_info.
  > 	* reload1.c: Likewise.
Very cool.


In reload.h, put the comments for the fields in the structure on the line(s)
before the field like this

  /* comment for a field */
  int a_field;

Unfortunately, there's also some indention problems you need to fix

!       reload_reg_rtx[i] = find_dummy_reload (in, out, inloc, outloc,
                                             inmode, outmode,
!                                            reload_reg_class[i], i,
                                             earlyclobber_operand_p (out));

Which changed into:

!       reloads[i].reg_rtx = find_dummy_reload (in, out, inloc, outloc,
                                             inmode, outmode,
!                                            reloads[i].reg_class, i,
                                             earlyclobber_operand_p (out));

The indention of the arguments needs to be fixed.  It sounds like a nit, but
it is important that we stick to the formatting standards.

Maybe gnu-indent or indent-region within emacs could help?

Can I assume that everything else was a global search and replace + copyright
updates?  I did spot checks only.


More information about the Gcc-patches mailing list