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: function inlining in ARM/Thumb


> 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.


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