Fwd: Clang equivalent of given flags

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: Clang equivalent of given flags

Sumner, Brian via cfe-dev
Hey Devs, 

Can someone suggest alternative flags for clang for the below-mentioned flags which work with GCC but get ignored in clang?

-fno-inline-functions-called-once
-finline-limit=200

Thanks, 
Rohit


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: Clang equivalent of given flags

Sumner, Brian via cfe-dev

I see that in clang/include/Driver/Options.td, both -finline_functions_called_once and -finline-limit have been defined as "clang_ignored_gcc_optimization_f_Group".

You can use -mllvm -inline-threshold=<value> as a replacement for -finline-limit=<value>. I am not sure if there is a replacement for
-finline_functions_called_once.

--Mandeep


On 7/30/2017 1:41 AM, ROHIT KUMAR via cfe-dev wrote:
Hey Devs, 

Can someone suggest alternative flags for clang for the below-mentioned flags which work with GCC but get ignored in clang?

-fno-inline-functions-called-once
-finline-limit=200

Thanks, 
Rohit



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: Clang equivalent of given flags

Sumner, Brian via cfe-dev
On 30 July 2017 at 15:55, Grang, Mandeep Singh via cfe-dev
<[hidden email]> wrote:
> You can use -mllvm -inline-threshold=<value> as a replacement for
> -finline-limit=<value>. I am not sure if there is a replacement for
> -finline_functions_called_once.

We generally don't have options to control the optimizers that
precisely. Even the threshold one you found is an LLVM internal option
and not guaranteed to be stable. It could disappear or arbitrarily
change its meaning at any point.

Tim.
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...