This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: function inlining in ARM/Thumb
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Arvind Krishnaswamy <arvind at CS dot Arizona dot EDU>
- Cc: gcc at gcc dot gnu dot org, Richard dot Earnshaw at arm dot com
- Date: Thu, 17 Jan 2002 16:41:18 +0000
- Subject: Re: function inlining in ARM/Thumb
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Hi,
> I notice that inspite of specifying optimisation level -O2, function
> inling is done when I compile for an ARM target. However, this does not
> happen if I choose a Thumb target. Is function inling done irrespective
> of the target architecture and only dependent on compile time options?
> Is ARM/Thumb treated differently from other architectures?
Can you be more precise? Examples would be a help.
At -O2, the compiler will only inline functions that are marked as
"inline", unless -finline-functions is also specified.
The heuristics used by -finline-function (on by default at -O3) are such
that some some functions may be inlined for ARM code that would not be for
Thumb code, simply because they will need more instructions to execute in
Thumb.
R.