how g++ handle multiple level inline functions with -O3 option

Feng Xian fxian@fxian.mine.nu
Thu Jun 26 15:45:00 GMT 2003


Hi,

I am using extern inline functions with #pragma interface and #pragma
implementation, my inline functions will call other inline function etc.
eventurelly my non-inlined function will call the exteren inline
functions. when I turned on the optimization option -O3 with
-finline-functions(with is not necessary according to info gcc), I
objdump the executable file, only part of inline functions are inlined,
lots of others are left out to be still a function call. even I use
-finline-limit=1000000, now, the compile time tripled but still
generated the similar result (function is not inlined, even the function
itself only a few line of code). 

can anybody explain me this and tell me how to make the inline real work
in gcc? thanks in advance.

Alex



More information about the Gcc mailing list