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]

Re: new allocator df.c: forgotten apply_change_group


Daniel Berlin <dberlin@redhat.com> writes:

> Denis Chertykov <denisc@overta.ru> writes:
> 
> > Sun Feb 18 21:52:50 2001  Denis Chertykov  <denisc@overta.ru>
> > 
> > 	* df.c (df_refs_reg_replace): Call to apply_change_group added.
> > 	(df_insn_mem_replace): Likewise.
> > 	(df_ref_reg_replace): Don't group changes.
> > 
> 
> Not quite right.
> What we *really* want is to group them when we call from
> df_refs_reg_replace, but not if we just call df_ref_reg_replace.

You right.

> 
> That way, when we are trying to replace all instances of a register on
> a given ref chain, we only do it if we can do all of them.
> Otherwise, we might end up with only some of them getting changed,
> which would be wrong.
> 
> However, if we are just trying to replace a given single instance,
> it's not grouped.
> 
> Hmmm.
> What's the best way to do this.

I don't know the best way.
Really I'm only point to problem. IE `forgotten apply_change_group'.

I have another question about df.c and ra.c

df_ref_record do this:

  if (regno < FIRST_PSEUDO_REGISTER)
    {
      int i;
      int endregno;
      
      if (! (df->flags & DF_HARD_REGS))
	return;

      endregno = regno + HARD_REGNO_NREGS (regno, GET_MODE (reg));

      for (i = regno; i < endregno; i++)
	df_ref_record_1 (df, gen_rtx_REG (reg_raw_mode[i], i),
	loc, bb, insn, ref_type);

So, moves_to_webs do

      link = DF_INSN_DEFS (df, m->insn);
      if (link->ref)
	{
	  web = &def2web[DF_REF_ID (link->ref)];
	  while (web->uplink)
	    web = web->uplink;
	  m->target_web = web;
	}

`link' is a link to wrong hard reg in reg_raw_mode if `reg' consists
of a few consecutive hard regs.

Denis.
PS: toplev.c from CVS don't have a call to `mm_reg_alloc', and
ra.c don't have a call to `reload'.






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