Who is the best inliner of all?
Posted Jan 15, 2009 14:56 UTC (Thu) by dwmw2
In reply to: Who is the best inliner of all?
Parent article: Who is the best inliner of all?
"GCC does an amazing job of poring over a complete 'program' and optimizing it when given the chance. Most programs (for perfectly valid reasons) are broken up into many source files for ease of maintenance, but this removes a large number of optimization opportunities."
For the Linux kernel, this is especially true in file system code, I believe. At http://lwn.net/Articles/197097/
there is a reference to some work I did a while back on building the kernel with -fwhole-program --combine
I should dig that out again.
"- Allowing more aggressive optimization has actually found real bugs in some of the code bases I've been working on, as the compiler has been able to see inside called functions and then report useful things like uninitialized variable usage that it could not do before."
Shows up a few compiler bugs too...
to post comments)