This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [dataflow] make regrename use deferred scanning
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Seongbae Park <seongbae dot park at gmail dot com>, "Edelsohn, David" <dje at watson dot ibm dot com>
- Date: Thu, 15 Feb 2007 23:27:30 -0500
- Subject: Re: [dataflow] make regrename use deferred scanning
- References: <45D479CF.7040108@lu.unisi.ch>
Paolo Bonzini wrote:
> The attached patch, which is also pretty tiny, allows us to use
> deferred rescanning for regrename.
>
> Actually it seems that someone had thought about it already but did
> not finish the work. Given this, ok to commit? I
> bootstrapped/regtested this on i686-pc-linux-gnu using
> "-frename-registers -O2" for all of BOOT_CFLAGS, CFLAGS_FOR_TARGET,
> and CXXFLAGS_FOR_TARGET.
>
I do not believe that this works in general. it may work on the x86...
but it will not work on machines with a lot of registers. The problem
is that the code that builds its internal version of the def-use chains
blasts apart the insns and puts them back together again in a way that
messes up the scanning. David edelsohn is working on fixing this, but
this is not correct.
kenny
> Paolo
>
>
> 2007-02-15 Paolo Bonzini <bonzini@gnu.org>
>
> * regrename.c (regrename_optimize): Use deferred insn rescan.
> (do_replace): Do ask dataflow to rescan the insn.
>
> Index: regrename.c
> ===================================================================
> --- regrename.c (revision 121999)
> +++ regrename.c (working copy)
> @@ -197,7 +197,7 @@ regrename_optimize (void)
> df_set_flags (DF_LR_RUN_DCE);
> df_ri_add_problem (0);
> df_analyze ();
> - df_set_flags (DF_NO_INSN_RESCAN);
> + df_set_flags (DF_DEFER_INSN_RESCAN);
>
> memset (tick, 0, sizeof tick);
>
> @@ -382,9 +382,7 @@ do_replace (struct du_chain *chain, int
> if (regno >= FIRST_PSEUDO_REGISTER)
> ORIGINAL_REGNO (*chain->loc) = regno;
> REG_ATTRS (*chain->loc) = attr;
> -#if 0
> df_insn_rescan (chain->insn);
> -#endif
> chain = chain->next_use;
> }
> }