On Tue, Apr 12, 2011 at 4:51 PM, Nathan Froyd <froy...@codesourcery.com> wrote: > On Tue, Apr 12, 2011 at 04:37:42PM +0200, Richard Guenther wrote: >> On Tue, Apr 12, 2011 at 4:32 PM, Nathan Froyd <froy...@codesourcery.com> >> wrote: >> > Thanks. I may go twiddle that patch to do something similar to mine and >> > submit that. Do you use your patch for checking that the same set of >> > optimizations get performed, then? I'm interested in using the >> > statistics for identifying passes that don't buy us much across a wide >> > variety of codebases. (Suggestions for suitable ones welcome!) >> >> Yes, I used it exactly for that. And also to verify that passes don't >> do anything if replicated (well, for those that shouldn't at least). >> >> Don't expect any low-hanging fruit though ;) I catched all of it already. >> >> Candidates are obviously SPEC and GCC itself. I also use tramp3d >> of course. That said, even if a pass does nearly nothing we often >> have testcases that need it ... > > True, but maybe those testcases should be adjusted--per-pass flags, > rather than blindly assuming -O2 includes them. And it's not clear to
It's easier to add things to GCC than to argue removing things ... > me that the statistics_counter_event infrastructure really helps > catching do-nothing passes, since it doesn't record stats that increment > by zero... Well, if the overall count is zero then nothing was done. Richard. > -Nathan >