gcc - using inline with -fPIC

Richard Henderson rth@redhat.com
Thu Nov 21 12:04:00 GMT 2002


On Wed, Nov 20, 2002 at 12:05:36PM +0200, Maya Bar wrote:
> I've observed (using a profiler) that -fPIC suppress the -finline-functions 
> that is set by -O3.

This is because -fPIC implies that the function may be overridden
by a different module, so automatic inlining is inappropriate.

> This has a significant impact on performance (15-25%). Is there a way to 
> enforce functions inline with -fPIC ?

Use the inline keyword.


r~



More information about the Gcc mailing list