This is the mail archive of the gcc-patches@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: [PATCH][Middle-end]Add a new option to finer control inlining based on function's visibility


Hi, Alexander,

thanks for your comments.

> On Sep 11, 2018, at 12:48 PM, Alexander Monakov <amonakov@ispras.ru> wrote:
> 
> On Tue, 11 Sep 2018, Qing Zhao wrote:
>> '-finline-visibility=[all|extern|static]'
>>     By default, GCC inlines functions without considering their
>>     visibility.  This flag allows finer control of inlining based on
>>     their visibility.
>> 
>>     The value 'extern' tells the compiler to only inline functions with
>>     external visibility.  The value 'static' tells the compiler to only
>>     inline functions with static visibility.  The value 'all' tells the
>>     compilers to inline functions without considering their visibility.
> 
> Is there a use case for -finline-visibility=extern?

our current major use cases are for -finline-visibility=static  and -finline-visibility=all (DEFAULT).

no immediate use case for -finline-visibility=extern right now. But I guess that GCC developers might use this option to control inlining scope for 
debugging or development purpose in the future.

> 
> This use of "visibility" is inappropriate. Symbol visibility already means
> something else in the ELF standard. What you're referring to as static/extern
> is termed either internal/external linkage in C language, or local/global
> binding in ELF.
> 

thanks for the suggestion, how about -finline-linkage=[all|extern|static]?

Qing
> Alexander


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