This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc - using inline with -fPIC


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]