This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc - using inline with -fPIC
- From: Richard Henderson <rth at redhat dot com>
- To: Maya Bar <maya at verisity dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 21 Nov 2002 11:09:37 -0800
- Subject: Re: gcc - using inline with -fPIC
- References: <3DDB5E70.4040403@verisity.com>
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~