This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR 46053] Devirtualization and thunks revisited
- 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: Fri, 22 Oct 2010 00:32:01 +0200
- Subject: Re: [PATCH, PR 46053] Devirtualization and thunks revisited
- References: <20101021134336.GB21785@virgil.arch.suse.de>
Hi,
the patch seems to make sense in general to me. I can't comment much of folder
bugs.
I think always inlining thunks even at -Os makes sense as the code will likely
combine (and we do that for non-thunked calls anyway).
An alternative I see is to take multiple entry points seriously on cgraph level:
have edges annotated with entry point, make ipa-prop to generate different jump
functions for every entry point and make inliner to handle thunk adjustments.
This will integrate more seamlessly once (if?) we get real multiple entry point
support.
> + /* Delta by which must be added to this parameter. For polymorphic calls
> + only. */
> + tree thunk_delta;
Thunks can get bit more complex than this (i.e. the covariant thunk etc). I think you
need to save all of thunk_info and make folding logic to match to all the adjustments
cgraph does.
Honza