This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: regclass speedup
- From: Richard Henderson <rth at redhat dot com>
- To: Mike Stump <mstump at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 15 Jan 2003 00:46:12 -0800
- Subject: Re: regclass speedup
- References: <F25BAADC-24E0-11D7-A00B-003065A77310@apple.com>
On Fri, Jan 10, 2003 at 01:17:38PM -0800, Mike Stump wrote:
> Here is a little one that avoids re-initializing for regclass. Speeds
> up regclass by about 88% for one of my compiles (Finder_FE). The only
> issue may be, can any of the things that influence auto-inc or auto-dec
> availability change from function to function?
I don't think so.
Couple o' things. First, there is a comment,
/* Initialize information about which register classes can be used for
pseudos that are auto-incremented or auto-decremented. It would
seem better to put this in init_reg_sets, but we need to be able
to allocate rtx, which we can't do that early. */
which appears to be false now -- init_reg_sets is called
after init_ggc. So it appears as if we can just move the
code rather than creating the late_regclass_init.
Second,
rtx r = gen_rtx_REG (VOIDmode, 0);
REGNO (r) = j;
PUT_MODE (r, m);
this is a no-no. We cannot randomly modify register rtxs
we get back from gen_rtx_REG. It may be shared. We should
be using gen_rtx_raw_REG instead.
r~