This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: tiny mark_reg_set speedup
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 26 Jan 2004 01:21:27 -0800
- Subject: Re: tiny mark_reg_set speedup
- References: <20040125221345.GC31157@kam.mff.cuni.cz>
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>