On Fri, Sep 21, 2018 at 11:12 AM, Qing Zhao <[email protected]> wrote:
> Hi, this is the 4th version of the patch.
>
> mainly address Martin’s comments on some spelling issues.
>
> I have tested the patch on both x86 and aarch64, no issue.
>
> Okay for commit?
>
> thanks.
>
> Qing.
>
> gcc/ChangeLog
>
> +2018-09-20 Qing Zhao <[email protected]>
> +
> + * cif-code.def (FUNCTION_EXTERN): New CIFCODE.
> + * common.opt (-finline-only-static): New option.
> + * doc/invoke.texi: Document -finline-only-static.
> + * ipa-inline.c (can_inline_edge_p): Control inlining based on
> + function's linkage.
I would suggest "internal" rather than "static" in general. So
+ N_("function has external linkage when the user requests only"
+ " inlining functions with internal linkage"))
+Inline functions only if they have internal linkage.
+@item -finline-only-internal
+@opindex finline-only-internal
+By default, GCC inlines functions without considering their linkage.
+This flag guides the inliner to only inline functions with internal linkage.
+This option has any effect only when inlining itself is turned on by the
+-finline-functions or -finline-small-functions options.
This should also mention whether it applies to functions explicitly
declared inline; I assume it does not.
Jason