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: Sharing hard registers


   From: law@redhat.com
   Date: Fri, 14 Jun 2002 04:23:59 -0600
   
   The latter is the reason why I think we can make shared hard regs
   work -- the compiler already has to deal with shared hard regs
   after reload.  The only code that should cause us problems is stuff
   generated in the prologue/epilogue expanders by the backend.

Ok.  The one issue is the fact that we can refer to a hard reg in many
different modes (whereas pseudos have a single mode in which they are
referred).

So if we allow hard reg sharing, it would be on a per-mode basis.  To
implement this we could have a table for each hard reg, similar to
some of the stuff you implemented already Jeff.  However, each entry
would be a list of REG objects.  When we try to gen a hard REG we
check the list, if we can't find one for the mode being requested we
allocate one and add it to the list.


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