This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR 45699] Devirtualize to thunks
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Guenther <rguenther at suse dot de>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Mon, 11 Oct 2010 17:08:19 +0200
- Subject: Re: [PATCH, PR 45699] Devirtualize to thunks
- References: <20101011133014.GA12977@virgil.arch.suse.de>
> Hi,
>
> folding of OBJ_TYPE_REFs just takes the function declaration in BINFOs
> and puts into the call statement. Unfortunately BINFOs do not put the
> declaration of the proper thunk there and so we might ending up not
> adjusting the this pointer like in the testcase below. On the other
> hand, BINFOs do contain the deltas and so the folding code can look up
> the right thunk in the call graph if need be. This is what the patch
> below does.
>
> Bootstrapped and tested on x86_64-linux without any issues. OK for
> trunk?
I guess we should also add an folder that transforms calls to thunk to call to
the function so inlining and other IPA stuff work?
At the moment i think both ipa-prop and inliner will get direct calls to thunks wrong.
Honza