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: [RFC] Fix PR rtl-optimization/33732


On Tue, Nov 06, 2007 at 02:35:21PM +0100, Eric Botcazou wrote:
> >    Can't df be used to update the REG_DEAD notes right after renumbering
> > pseudos into hard regs? IMHO that'd be better than making a part of reload
> > handle REG_DEAD notes specially.
> 
> We already do that though, see PR middle-end/20973.

   Right. We didn't have the option of accurate REG_DEAD notes back then.

> >    Currently, we stop df from keeping its data up-to-date shortly before
> > calling reload() (in two places in global.c). Suppose we move that into
> > reload1.c/reload() itself after this bit:
> >
> >   /* Alter each pseudo-reg rtx to contain its hard reg number.
> >      Assign stack slots to the pseudos that lack hard regs or equivalents.
> >      Do not touch virtual registers.  */
> >
> >   for (i = LAST_VIRTUAL_REGISTER + 1; i < max_regno; i++)
> >     alter_reg (i, -1);
> >
> >    At this point, df should be able to update the REG_DEAD notes. Then we
> > can turn off df rescanning for the rest of reload.
> 
> I'm not a specialist of DF so I don't know whether this is realistically 
> doable, but the comment doesn't sound very encouraging:
> 
>       /* There is just too much going on in the register allocators to
> 	 keep things up to date.  At the end we have to rescan anyway
> 	 because things change when the reload_completed flag is set.  
> 	 So we just turn off scanning and we will rescan by hand.  
> 
> 	 However, we needed to do the rescanning before this point to
> 	 get the new insns scanned inserted by local_alloc scanned for
> 	 global_conflicts.  */
>       df_set_flags (DF_NO_INSN_RESCAN);
> 
> Comments on this comment?

   I didn't see any place where we modify insns (directly or indirectly)
between the places where we now stop rescanning and the place where I
suggest moving it to, so I think it has a chance of working.

  (I'm not a DF specialist either.)

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year


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