This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tiny mark_reg_set speedup


Jan Hubicka <jh@suse.cz> writes:

> Hi,
> second hottest line is line checking HARD_REGNO_NREGS inside flow.c...
> I updated only the uses in flow.c and the benefits seems to be somewhere
> in between 0.8-1.6 seconds per 2m compilation.  If this seem worthwhile,
> I can update rest of the uses.
> 
> Bootstrapped/regtested i686-pc-gnu-linux (as all the previous patches
> today, I think I forgot it to mention, sorry)
> OK?

This is OK, but please:

- Change the rest of the cases; and then
- Turn HARD_REGNO_NREGS into a hook which computes the array
  (and by default just calls the HARD_REGNO_NREGS macro, until all
  the backends are updated).

For an example of why it should be a hook, look at the rs6000
HARD_REGNO_NREGS: seven lines of macro horribleness.

> 	* regclass.c (hard_regno_nregs): New global array.
> 	(init_reg_sets_1): Initialize it.
> 	* flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_flag,
> 	count_or_remove_death_notes_bb):  Use new arrays.
> 	* regs.h (hard_regno_nregs): Declare.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]