This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, PR 46053] Devirtualization and thunks revisited


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]