[cfe-dev] How to interpret the option `-finline-hint-functions`?
Mahesha S via cfe-dev
cfe-dev at lists.llvm.org
Thu Jan 30 10:59:29 PST 2020
Thank you. It is even more clear to me now.
On Fri, Jan 31, 2020 at 12:10 AM Reid Kleckner <rnk at google.com> wrote:
> I believe you are correct. I think [1] is implied by most -O levels, and
> it mainly exists so that users can use the negative version of it,
> -fno-inline-functions. I think [2] exists to give users an in between level
> when the user finds the compiler's decisions to be too aggressive, either
> for performance or debugging reasons.
>
> On Thu, Jan 30, 2020 at 9:35 AM Mahesha S via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>> Hi-
>>
>> We have following clang options which are related to function inlining.
>>
>> [1]. -finline-functions: Inline suitable functions
>> [2]. -finline-hint-functions: Inline functions which are
>> (explicitly or implicitly) marked inline
>>
>> My interpretation of [1] is that we inform the compiler - to take a
>> decision about function inlining on its own discretion, that way, it may
>> chose to inline few functions which are not explicitly marked with the
>> `inline` keyword and may chose *not *to inline few functions which
>> are explicitly marked with `inline` keyword.
>>
>> Again, my interpretation of [2] is that we inform the compiler - to take
>> a decision about function inlining on its own discretion, but, in this
>> case, about *only *the functions which are explicitly marked with the
>> `inline` keyword, nothing else.
>>
>> Am I correct with my above understanding?
>>
>> --
>> Thanks,
>> Mahesha
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
>
--
Thanks,
Mahesha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200131/034cc295/attachment-0001.html>
More information about the cfe-dev
mailing list