How to interpret the option `-finline-hint-functions`?

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?

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.

Thank you. It is even more clear to me now.