This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING^3: [PATCH] i386: Don't generate alias for function return thunk
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 15 Mar 2018 19:02:30 +0100
- Subject: Re: PING^3: [PATCH] i386: Don't generate alias for function return thunk
- References: <CAMe9rOoRdnaCVabzcN9kF=SJego_thMB3TF3Kt=fAzPR1RXkVw@mail.gmail.com> <20180315155108.GA43264@kam.mff.cuni.cz> <CAMe9rOqawknskmUSbYbnmL=Nx=_ZdAWnUKrksG2jr+UESqMAPw@mail.gmail.com> <20180315160353.GB17189@kam.mff.cuni.cz> <CAMe9rOrYjV=1fOqFweAGSdqftP0BVn360YDV4MFkF2bArMniVw@mail.gmail.com> <20180315174700.GC17189@kam.mff.cuni.cz> <CAMe9rOqPMFy+F8BFJHfbYRLCi=+u0BFQ1bgqC922D9ouVRpgtw@mail.gmail.com>
> On Thu, Mar 15, 2018 at 10:47 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> >> On Thu, Mar 15, 2018 at 9:03 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> >> >> > What is the reason for using different names for return and indirect thunks at first place?
> >> >> >
> >> >>
> >> >> These 2 thunks are identical. But one may want to provide an
> >> >> alternate thunk only for
> >> >> indirect branch and leaves return thunk alone. You can't do that if
> >> >> both have the same
> >> >> name.
> >> >
> >> > Hmm, OK, what is the benefit to have two different thunks? It is just
> >> > safety precaution so we could adjust one without adjusting the other in
> >> > future?
> >> >
> >>
> >> That is correct.
> >
> > Hmm, I guess the patch is OK. Things are slightly more flexible this way and
> > duplicating thunk is not terribly expensive. One can always link with
> > non-comdat+ alias.
> >
>
> That is true. OK to backport to GCC 7 after a few days?
OK.
Honza
>
> Thanks.
>
> --
> H.J.