Reducing RTL allocations

law@redhat.com law@redhat.com
Wed Jun 12 08:46:00 GMT 2002


In message <orsn3tz4qs.fsf@free.redhat.lsd.ic.unicamp.br>, Alexandre Oliva writ
es:
 > On Jun  9, 2002, law@redhat.com wrote:
 > 
 > > In message <orbsaly8lj.fsf@free.redhat.lsd.ic.unicamp.br>, Alexandre Oliva
 >  writes:
 > 
 > > How could regrename safely modify any reg in-place since some of the hard
 > > regs is sees come from pseudos which were turned into hard regs (which are
 > > shared).
 > 
 > This is what I saw:
 > 
 > static void
 > do_replace (chain, reg)
 >      struct du_chain *chain;
 >      int reg;
 > {
 >   while (chain)
 >     {
 >       unsigned int regno = ORIGINAL_REGNO (*chain->loc);
 >       *chain->loc = gen_raw_REG (GET_MODE (*chain->loc), reg);
 >       if (regno >= FIRST_PSEUDO_REGISTER)
 > 	ORIGINAL_REGNO (*chain->loc) = regno;
 >       chain = chain->next_use;
 >     }
 > }
 > 
 > I misread it as modifying the reg in place.  Somehow I managed to miss
 > the intervening gen_raw_REG.  D'oh.  Sorry about the noise :-(
No problem :-)  

jeff



More information about the Gcc-patches mailing list