This is the mail archive of the 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]

Heads up re: shared register rtx in regno_reg_rtx

  If anyone ever decides to re-enable this bit of code from
emit-rtl.c/gen_rtx_REG (...), 

#if 0
  /* If the per-function register table has been set up, try to re-use
     an existing entry in that table to avoid useless generation of RTL.

     This code is disabled for now until we can fix the various backends
     which depend on having non-shared hard registers in some cases.   Long
     term we want to re-enable this code as it can significantly cut down
     on the amount of useless RTL that gets generated.

     We'll also need to fix some code that runs after reload that wants to
     set ORIGINAL_REGNO.  */

  if (cfun
      && cfun->emit
      && regno_reg_rtx
      && regno < FIRST_PSEUDO_REGISTER
      && reg_raw_mode[regno] == mode)
    return regno_reg_rtx[regno];

you'll have to do something to make it play nicely with this bit of code
from postreload.c/reload_cse_regs_1

static void
reload_cse_regs_1 (first)
     rtx first;
  rtx insn;
  rtx testreg = gen_rtx_REG (VOIDmode, -1);


  Heh.  If the rtx-sharing code hadn't been disabled within a couple of days
of it's first having been checked in, someone would have noticed this
earlier.  I couldn't even get through the libgcc stage of the x-build
without running into SEGVs caused by it.

Can't think of a witty .sigline today....

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