PATCH: sjlj exceptions
Richard Henderson
rth@cygnus.com
Fri Oct 27 16:09:00 GMT 2000
On Fri, Oct 27, 2000 at 04:21:27PM -0400, John David Anglin wrote:
> There are two separate parts to the fix. The first part is to define
> a nonlocal goto label after the setjmp call when a library version of
> setjmp. This fixes the basic block reordering problem noted in this post:
> < http://gcc.gnu.org/ml/gcc-bugs/2000-10/msg00526.html >.
This is surely wrong.
The only correct way to fix the edge count problems in sjlj exception
handling is to partition the non-local goto support such that we can
keep track of which labels are used for actual non-local gotos and
which are exception handling targets. To-date, no one has cared,
since dwarf2 exceptions are so much cleaner.
> The second part is to set current_function_calls_setjmp = 1. This causes
> the gcse pass to punt, preventing the memory buildup. I think it is also
> necessary to ensure that registers are properly saved.
This should only be done for DONT_USE_BUILTIN_SETJMP, and it
is only needed if the target defines NON_SAVING_SETJMP. I.e.
it is a problem, but not for pa.
> On the otherhand, I doubt -fno-sjlj-exceptions has ever been
> tested on the pa.
I'd have thought Jeff would have played with it for pa64. But
even if he didn't, it would be a good thing to get this enabled.
> Currently, calls without a REG_EH_REGION note generate edges to
> all nonlocal labels in the function.
This is absolutely correct. The problem is not with this, it is
that non-local labels are being used to represent EH. If you
really did have 60 real non-local goto targets, you really would
have to create all of those edges.
r~
More information about the Gcc-bugs
mailing list