[PATCH] Fix aarch64 exception handling (PR c++/59813)

Michael Matz matz@suse.de
Tue May 14 12:55:00 GMT 2019


Hi,

On Tue, 14 May 2019, Jakub Jelinek wrote:

> In https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00484.html I've posted 
> a patch that would set it earlier (or it could be set during 
> gimplification and propagated during inlining, would need to be in 
> cfun->calls_eh_return instead of crtl->calls_eh_return) and then targets 
> for which we do not want to bother with it or where it is not beneficial 
> to have tail calls in functions that call __builtin_eh_return (as I said 
> in the thread, e.g. on x86_64-linux it is both smaller and faster),

I really think you're over-obsessing with the optimization in this case. 
Given the general slowness of DWARF CFI interpretation (which always 
happens before eh_return) any optimization re tail-calls in any of 
_Unwind_RaiseException _Unwind_ForcedUnwind _Unwind_Resume or 
_Unwind_Resume_or_Rethrow (of which only the latter looks amenable) seems 
a bit silly.  Disable tail-calls whenever builtin_eh_return is seen in the 
gimplifier (in all four functions in the world!), and be done.


Ciao,
Michael.



More information about the Gcc-patches mailing list