This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Update for cprop patch
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Re: Update for cprop patch
- From: Bernd Schmidt <bernds at cygnus dot co dot uk>
- Date: Tue, 13 Jul 1999 13:39:13 +0100 (BST)
- cc: law at cygnus dot com
Jeff Law wrote:
> In message <Pine.SOL.4.10.9906012038300.24328-100000@jennifer.informatik.rwth
> -aachen.de>you write:
> > This is an updated version of the cprop enhancement patch I submitted a
> > few weeks ago. Changes:
> > - this one applies cleanly to the current CVS sources
> > - In find_avail_set, avoid infinite loops when we run into a cycle (this
> > can happen e.g. if we have a no-op set in the hash table).
> By a no-op set I assume you mean something like
> (set (reg X) (reg X))?
Yes. I encountered one of those when building glibc.
> If so, one could argue we shouldn't ever put that into the set table to
> start with.
Sounds reasonable, but I'm not sure whether it's enough to prevent cycles.
> I think you want to move the call to oprs_not_set_p from cprop_insn into the
> loop in find_avail_set since you want the loop to stop if it encounters a
> register in the copy chain that is set earlier in the block.
Can that ever happen? Doesn't find_avail_set look for sets that are
available at the start of the basic block the current insn is in (in which
case the reg can't be set between the start of the block and the current
insn)?
Bernd