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 Thu, 10 Sep 2009, Richard Guenther wrote:
> On Tue, 8 Sep 2009, Richard Henderson wrote:
>
> > On 09/08/2009 08:20 AM, Richard Guenther wrote:
> > > > Ok. I'll modify the patch to make this a true langhook and maybe move
> > > > the eh-personality also to a langhook called from eh lowering.
> > >
> > > The latter is difficult as C++ is playing some tricks with Java vs.
> > > non-Java personality, so I leave that alone for now.
> >
> > Ew.
> >
> > > FYI the following two patches would implement the above (untested).
> >
> > Looks good.
>
> I've been playing a bit with optimizing setting of
> DECL_FUNCTION_EH_PERSONALITY only if the function uses EH types
> instead of just checking for an empty EH region tree. It doesn't look
> like its very simple - even a catch (...) needs a personality routine.
>
> So I am now testing the following - the ERT_ALLOWED_EXCEPTIONS case
> is required to get diagnostics from g++.dg/torture/pr34850.C which
> requires inlining memset into clear_mem.
>
> If that doesn't work out I'll refrain from optimizing at all and
> just disable cross different EH personality TU inlining completely
> (that already passed bootstrapping and testing, it would be
> - if (function_needs_eh_personality (cfun))
> - DECL_FUNCTION_PERSONALITY (current_function_decl) =
> eh_personality_decl;
> + DECL_FUNCTION_PERSONALITY (current_function_decl) =
> eh_personality_decl;
> meaning no functional change as far as trunk is concerned)
Doesn't seem to work. Instead I tried to fall back to
the gcc personality for detecting empty type lists, again setting
a cfi personality for all functions we emit. But that doesn't work
either (it seems catch (...) doesn't work with the gcc personality,
g++.dg/eh/loop1.C fails).
Bah.
So, ok without trying to be clever about inlining cross personality
for now?
Thanks,
Richard.