Bad inlining because of "throw"

Ian Lance Taylor iant@google.com
Fri Nov 12 06:39:00 GMT 2010


John Fine <johnsfine@verizon.net> writes:

> Having the branch predictor know which path is likely ought to at
> least help branch prediction.  A really smart optimizer would
> de-inline the cold blocks of an inlined function.  I doubt that GCC is
> that sophisticated, but maybe it is worth trying it and looking at the
> generated code.

That is what the -freorder-blocks-and-partition option does.  That
option does have some limitations, and is not the default at any
optimization level.

Ian



More information about the Gcc-help mailing list