Subject: bug#12541: Prefer plain 'static' to 'static inline'.

From: Paul Eggert <[email-masked]>
Date: Sun, 30 Sep 2012 11:48:15 -0700

On 09/30/2012 11:33 AM, Eli Zaretskii wrote:
>> From: Paul Eggert <[email-masked]>
>>
>> On my platform (GCC 4.7.2 -O3, x86-64, Fedora 17, trunk bzr 110287)
>> GCC does not always inline 'bidi_char_at_pos': in a couple of cases
>> the function is only partly inlined.
> 
> Is this so with either 'static inline' or with 'static'?

The former.  That is, the above comment is talking about the current
trunk, which uses 'static inline'.

> is there any difference, in terms of generated code, that
> you see between using and not using 'inline' for these functions?

Yes, as described below, if we omit 'inline' GCC does less inlining:
it inlines the small static functions, but some of the larger ones are
not inlined.

>> With the proposed change, the set of functions that are not always
>> inlined expands to bidi_cache_iterator_state, bidi_char_at_pos, and
>> bidi_fetch_char, and (if we also include functions that are partially
>> inlined) bidi_cache_search and bidi_get_type.
> 
> Were they also not inlined before the change?

Most of these functions were inlined before the change.  However, as
described above, bidi_char_at_pos was only partially inlined before
the change.