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]
Other format: [Raw text]

Re: [tree-ssa] Copy propagation [patch]


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


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