This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Merge from LTO: eh_personality changes
On Sat, 5 Sep 2009, Richard Henderson wrote:
> On 09/04/2009 06:34 AM, Richard Guenther wrote:
> > + sorry ("Multiple EH personalities are supported only with assemblers "
> > + "supporting .cfi.personality directive.");
>
> There's no reason this can't be fixed. You simply need to rearrange
> the .eh_frame generation to emit multiple CFI's.
Ok. The sorry () merely affects LTO for now (there's no other way you
can have different personalities in a TU), so I guess a FIXME is enough
here? I understand that without this patch LTOing C and C++ together
wouldn't work, but maybe Diego can clarify.
> Also, I think you need to add something to prevent inlining of functions
> that use different personality functions.
I don't think so. The IL should be still in a state where the inlined
pieces would simply inherit the callers personality. But maybe I'm
missing something?
> Do you have a strategy for handling
>
> if (targetm.arm_eabi_unwinder)
> unwind_resume_libfunc = init_one_libfunc ("__cxa_end_cleanup");
>
> since this function is only used for c++/java?
No. Do you have something in mind?
I see the patch is somewhat incomplete (there's also
lang_eh_runtime_type, but maybe we never call add_type_for_runtime
after a frontend finishes - in which case this should have been
a langhook?) - and in general the integration of EH aware and
non-EH aware code with LTO still needs work and thought.
At least it seems to work - and as I'm not too deep into EH
related code I don't have plans to extend it much.
Thanks,
Richard.