Clang equivalent of given flags

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

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= as a replacement for -finline-limit=. I am not sure if there is a replacement for
-finline_functions_called_once.

–Mandeep

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.