This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Copy propagation [patch]
- From: law at redhat dot com
- To: Eric Christopher <echristo at redhat dot com>
- Cc: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>, Diego Novillo <dnovillo at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Fri, 28 Feb 2003 18:36:21 -0700
- Subject: Re: [tree-ssa] Copy propagation [patch]
- Reply-to: law at redhat dot com
In message <1046480496 dot 1234 dot 13 dot camel at ghostwheel dot ges dot redhat dot com>, Eric Christoph
er writes:
>
>> You can cut down the copies during SSA form building, but we would still
>> need this as a separate pass to cleanup the garbage that PRE (and later
>> on GVN and VRP) may leave behind.
>>
>
>Well, one of the advantages that a hashed ssa gives you is the ability
>to get GVN for free, but your point still stands. :)
Note the stuff isn't really hashed SSA that you find in the SGI
compiler or under a different name in Morgan's book (yes, if you look
closely they're both basically the same thing).
The stuff I'm talking about does value-numbering, constant and copy prop
on the dominator tree while rewriting the function into SSA. The cool thing
is the cost is basically a hash table lookup and a little bookkeeping in the
hash table as we leave blocks.
This effectively subsumes most of the crap done by cse1, particularly all
the path following code that cse1 does in such an incredibly dumb fashion.
I had this up and running on the RTL SSA code a while back, but never checked
it in (I had to bastardize cselib a little to ignore memory operands and
never cleaned that code up). It's pretty simple stuff.
jeff