[LLVMdev] how to resolve llvm exception IR?
Jim Grosbach
grosbach at apple.com
Tue May 5 09:36:32 PDT 2009
On May 5, 2009, at 2:48 AM, zhengjian zhang wrote:
> hi,
>
> I'm doing to make llvm backend support sjlj-eh! I have try to
> use the llvm-IR to generate the sjlj-eh code,
> but I'm totally despair !
> my major problem is that llvm-ir , I mean exception instrinstics
> are enough for codegen the sjlj-eh code? May I need to modify the
> llvm-gcc ?
> or someone can give some advice about llvm-backend 's support sjlj-
> eh ?
>
Hi,
I'm working on getting SJLJ exception handling working for ARM. What
sort of sjlj exception handling are you looking to do? There's a bit
of subtlety to getting things working. For example, do you want to use
the standard library setjmp/longjmp functions for flow control, or do
you want to replicate the GCC approach of builtins to do that? To be
compatible with GCC code, the latter approach is necessary, and is
what I'm working on.
There's definitely more to it than the current intrinsics, which are
there to support dwarf. SJLJ exceptions rely on runtime library
functions to register and unregister call frames which require
unwinding, so we need to modify LLVM to handle generating those calls.
Most of the landing pad organization should transfer over with only a
bit of tweaking. The type checking and catch selection needs to be
compatible with what's passed from GCC generated code, so there's a
bit of work to do there as well.
-Jim
More information about the llvm-dev
mailing list