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: regclass speedup


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~


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