-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/06/11 12:02, William J. Schmidt wrote: > On Thu, 2011-10-06 at 11:35 -0600, Jeff Law wrote: >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 >> >> On 10/06/11 04:13, Richard Guenther wrote: >> >>> >>> People have already commented on pieces, so I'm looking only at >>> the tree-ssa-reassoc.c pieces (did you consider piggy-backing >>> on IVOPTs instead? The idea is to expose additional CSE >>> opportunities, right? So it's sort-of a strength-reduction >>> optimization on scalar code (classically strength reduction in >>> loops transforms for (i) { z = i*x; } to z = 0; for (i) { z += >>> x }). That might be worth in general, even for non-address >>> cases. So - if you rename that thing to >>> tree-ssa-strength-reduce.c you can get away without >>> piggy-backing on anything ;) If you structure it to detect a >>> strength reduction opportunity (thus, you'd need to match >>> two/multiple of the patterns at the same time) that would be a >>> bonus ... generalizing it a little bit would be another. >> There's a variety of literature that uses PRE to detect and >> optimize straightline code strength reduction. I poked at it at >> one time (RTL gcse framework) and it looked reasonably promising. >> Never pushed it all the way through. >> >> jeff > > I ran across http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22586 and > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35308 that show this > question has come up before. The former also suggested a > PRE-based approach. Yea. We've kicked it around several times over the last 15 or so years.
When I briefly looked at it, I was doing so more in the context of eliminating all the optimize_related_values crap, purely as a cleanup and utlimately couldn't justify the time. IIRC Morgan & Muchnick both had write-ups on the basic concepts. There's probably other literature as well. jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOje4wAAoJEBRtltQi2kC7q9UIAIXdiGG5Reu75PBkMPO9KKhn RRGKQMMNSinGDyyORGqxfqwrirtFuQqzn+ITRsfjegHydUTwwDDaAtTyqEqFmpt0 2phGYBOS5pN4VImKzrd2fxlwbuW0jUlOpDuWFK+K10W8jU3SlJSIZhfaSMh1PwC5 IQm6FLDiuRuNSgyYattUnI5KZ2chN2QEkfUBQgDvbxHXfPDqjNQymIfv1K9iymrG j3Wq7i47fBkYbnPYtAQ9GCYsmT6Wo2v+2/ZeFWE417FYYhgCdBeYu2iZPE6Nm8Pb SypPDyi1AQ3QRfg+LPiN1bdQk40MhfPlMhHZtnVtq8nEa9+fLTgO/ERzCD0G+r8= =XWLf -----END PGP SIGNATURE-----