[Fwd: [PATCH, RFC] Expose target addressing modes before expand (revised)]

William J. Schmidt wschmidt@linux.vnet.ibm.com
Fri Feb 25 14:17:00 GMT 2011


Steven and Jeff, thanks for the pointers.  The full dominator walk with
callbacks is probably overkill; I will probably model my code after the
eliminate_degenerate_phis pass in ssa-tree-dom.c, which just walks the
dominator tree in a simple manner.

On Thu, 2011-02-24 at 14:55 -0700, Jeff Law wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 02/24/11 14:46, Steven Bosscher wrote:
> > On Thu, Feb 24, 2011 at 8:12 PM, Jeff Law <law@redhat.com> wrote:
> >> On 02/24/11 11:24, William J. Schmidt wrote:
> >>> It occurs to me that it would be easy to expand the CSE by saving the
> >>> hash table for each block, rather than throwing it out immediately.
> >>> Each block could then seed its hash table with the data from its
> >>> immediate dominator.  This would avoid relying on a downstream global
> >>> CSE to clean up afterwards.
> >> Yup.  That's standard stuff for CSE.  The existing code in GCC
> >> (tree-ssa-dom.c and cse.c) already do this.
> > 
> > Right, and this new pass could re-use at least the dominator tree
> > walker (domwalk.[ch]?).
> domwalk can be pretty heavyweight, but for what it sounds like William
> is doing, it might make sense.
> 
> William would also find code in tree-ssa-dom that manages select removal
> of expressions from the various tables as the walker leaves blocks
> during the domwalk.  That probably makes more sense than saving the hash
> table :-)

Yes, after thinking through it a little more, I'll do something along
these lines.  It should be simple enough to keep only the active
expressions in my alloc_pool as I walk down and up the tree.

Oh, and please call me Bill. :)

Thanks again!

> 
> jeff
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
> 
> iQEcBAEBAgAGBQJNZtPTAAoJEBRtltQi2kC77MUH/j2v+qOBbEmnKNGxwL5O5pqI
> 59Ujz0i9jKmbaSOKd73Cic1s0Cs27jbn1OqU9NQmHeeiEyv4lSzRozhkFQ772COM
> g8WZiAXmYPylm1Rcia/t3V7WhDE2C/W9XLyF0CN9iJ/cxAfy89Ox6d5yls3aAd4u
> V0m7xQIQa78OjNR84rkEJK4vDEAmnlSqWotPBgbohjTnt7pfkJC4tDjUn0zutoCC
> On9h+udqbbQO/Uj27XI8ozRNpobUhvtIVO4+etp4LcMmHGdCRq95hOpmfm5O6tBz
> AwIQ15qHPcCA/zOlBOy0MT1wmbeXp63Xg+zPSUwowD4Q+6KOh67h0kwxaxsG44k=
> =Z41o
> -----END PGP SIGNATURE-----




More information about the Gcc-patches mailing list