------- Comment #13 from hubicka at ucw dot cz 2009-07-02 10:10 ------- Subject: Re: [4.5 regression] 0.5% code size regression caused by r147852
OK, on i386 it has some effect according to our nightly tester it is 3524421->3510754. The size used to be as low as 3431090 so it is just small improvement. I guess I will commit the patch anyway as it is quite obvious fix. The other problem might be the "likely_eliminated_by_inlining_p" predicate that is very optimisitic. This predicate makes inliner to believe that all indirect reads and writes to/from pointers passed to function or function parameters will be optimized out. This is important to allow inlining of methods and SRAing out objects in C++ and devirtualizing calls, but for C code it is bit too optimistic. Partly this can be cured by IPA-SRA and Martin has WIP patch for clonning that contains more fine grained analysis of function body size specialized for given parameters. I however doubt they will catch all the cases we need for C++. Perhaps simply disabling the predicate for -Os or making it just weak hint (removing some percentage of estimated cost) is best way to go, I am just re-testing it on vangelis with size estimates ignoring it. Honza -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40436