This is the mail archive of the gcc@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: Register objects question


> -----Original Message-----
> From: gcc-owner On Behalf Of Jared Buttles
> Sent: 25 March 2004 18:18

> I'm looking to create some rtl statements that reference 
> registers, but it is my understanding that registers, as 
> objects, are unique and stored in the regno_reg_rtx[] array. 
> If that is the case, then why does regno_reg_rtx[] return a 
> different rtl address than that used (as is evident when I 
> print the rtl list)? How do I access the register object 
> actually being used in the rtl? Am I fundamentally 
> misunderstanding the storage of these things?

  You'd better pay close attention to this bit of code from gen_rtx_REG  in
emit-rtl.c:

------->snip<-------
#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];
#endif
------->snip<-------


  Basically reg rtx sharing had to be disabled, so although the array is
still setup it doesn't get used.

    cheers, 
      DaveK
-- 
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]