This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Update for cprop patch
- To: Bernd Schmidt <bernds at cygnus dot co dot uk>
- Subject: Re: Update for cprop patch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 24 Aug 1999 22:21:56 -0600
- cc: egcs-patches at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.LNX.4.10.9907161109590.17496-100000@biriani.cygnus.co.uk>you
write:
> I left in the code to avoid infinite loops for now - I'd be happy to remove
> it if I was convinced they can't happen anymore.
They can't :-)
Ultimately, to get a loop you would need two copies available at the start of
of the block which reference each other. ie.
(set (reg X) (reg Y))
(set (reg Y) (reg X))
Assume we had the first set in the hash table, then we encountered the second
set. The second set would kill the first which would make only the second
set available. Similarly if we had the second set in the hash table and later
encountered the first.
Thus, it is impossible for any single path to have both sets available at the
same time. And since computation of avin at any point is the intersection of
all the paths to that point we can never have both sets avin at a node, even if
there are multiple paths to that node.
Proof that this holds for a chain involving more than 2 sets is left as an
exercise to the reader :-)
I updated your patch and installed it. Here's a copy of the actual patch
that I installed.