This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][Middle-end][Version 4]Add a new option to control inlining only on static functions
>
> Okay, I see.
>
> >
> > If you make this to be INTERPOSABLE (which means it can be replaced by different
> > implementation by linker and that is probably what we want for live patching)
> > then also inliner, ipa-sra and other optimization will give up on these.
>
> do you suggest that to set the global function as AVAIL_INTERPOSABLE when -finline-only-static
> is present? then we should avoid all issues?
It seems to be reasonable direction I think, because it is what really happens
(well AVAIL_INTERPOSABLE still does not assume that the interposition will
happen at runtime, but it is an approximation and we may introduce something like
AVAIL_RUNTIME_INTERPOSABLE if there is need for better difference).
I wonder if -finline-only-static is good name for the flag though, because it
does a lot more than that. Maybe something like -flive-patching?
How much is this all tied to one particular implementation of the feature?
Honza
>
> Qing
>
>
> > Honza
> >>
> >>
> >>> For example comdat that was cloned by IPA-SRA. See can_be_local_p and
> >>> comdat_can_be_unshared_p predicates. Similar problem happens to clones created
> >>> by ipa-cp.
> >>>
> >>> I guess we want to disable localization and cloning in this case as well.
> >>> I wonder what else.
> >>
> >> Yes, I think we should make -finline-only-static incompatible with cloning and tree-sra too.
> >>
> >> Qing
> >>>
> >>> Honza
>