[LLVMdev] Exception handling in JIT

Nicolas Geoffray nicolas.geoffray at lip6.fr
Mon Dec 10 09:52:00 PST 2007

Hi everyone,

Here's a patch that enables exception handling when jitting. I've
copy/pasted _many_code from lib/Codegen/DwarfWriter.cpp, so we may need
to factorize it, but the functionality is there and I'm very happy with
it :)

lli should now be able to execute the output from llvm-gcc when using
exceptions (the UnwindInst instruction is not involved in this patch).
Just add the -enable-eh command line argument.

There is room for improvement here: I generate a common EH frame table
and an EH frame table for each generated function. The common EH frame
table should be shared between functions with the same personality
function (EH gurus, correct me if I'm wrong)

Note that since only x86 generates correct exception tables (that I know
of), you can only test this on x86.

Let me know what you think about it.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: jitEH.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20071210/c25849b6/attachment.ksh>

More information about the llvm-dev mailing list