X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FExceptionHandling.html;h=d597ffb3c8b31703603ba85a1fed892f82ef147d;hb=a75ce9f5d2236d93c117e861e60e6f3f748c9555;hp=f67954f7e2b17b5bb5777cfb04b760c2ed44f259;hpb=29626642271ae810dd526de8afa151484452abe0;p=oota-llvm.git diff --git a/docs/ExceptionHandling.html b/docs/ExceptionHandling.html index f67954f7e2b..d597ffb3c8b 100644 --- a/docs/ExceptionHandling.html +++ b/docs/ExceptionHandling.html @@ -4,7 +4,7 @@
Setjmp/Longjmp (SJLJ) based exception handling uses LLVM intrinsics + llvm.eh.sjlj.setjmp and + llvm.eh.sjlj.longjmp to + handle control flow for exception handling.
+ +For each function which does exception processing, be it try/catch blocks + or cleanups, that function registers itself on a global frame list. When + exceptions are being unwound, the runtime uses this list to identify which + functions need processing.
+ +
Landing pad selection is encoded in the call site entry of the function + context. The runtime returns to the function via + llvm.eh.sjlj.longjmp, where + a switch table transfers control to the appropriate landing pad based on + the index stored in the function context.
+ +In contrast to DWARF exception handling, which encodes exception regions + and frame information in out-of-line tables, SJLJ exception handling + builds and removes the unwind frame context at runtime. This results in + faster exception handling at the expense of slower execution when no + exceptions are thrown. As exceptions are, by their nature, intended for + uncommon code paths, DWARF exception handling is generally preferred to + SJLJ.
+Note: a rethrow from within the catch may replace this call with + a __cxa_rethrow.
- i8* %llvm.eh.exception( ) + i8* %llvm.eh.exception()
This intrinsic returns a pointer to the exception structure.
@@ -378,8 +420,7 @@- i32 %llvm.eh.selector.i32(i8*, i8*, i8*, ...) - i64 %llvm.eh.selector.i64(i8*, i8*, i8*, ...) + i32 %llvm.eh.selector(i8*, i8*, ...)
This intrinsic is used to compare the exception with the given type infos, @@ -411,8 +452,7 @@
- i32 %llvm.eh.typeid.for.i32(i8*) - i64 %llvm.eh.typeid.for.i64(i8*) + i32 %llvm.eh.typeid.for(i8*)
This intrinsic returns the type info index in the exception table of the @@ -451,6 +491,26 @@
+ void %llvm.eh.sjlj.setjmp(i8*) ++ +
The llvm.eh.sjlj.longjmp + intrinsic is used to implement __builtin_longjmp() for SJLJ + style exception handling. The single parameter is a pointer to a + buffer populated by + llvm.eh.sjlj.setjmp. The frame pointer and stack pointer + are restored from the buffer, then control is transfered to the + destination address.
+ +- i8* %llvm.eh.sjlj.lsda( ) + i8* %llvm.eh.sjlj.lsda()
Used for SJLJ based exception handling, the @@ -470,6 +530,41 @@
+ void %llvm.eh.sjlj.callsite(i32) ++ +
For SJLJ based exception handling, the + llvm.eh.sjlj.callsite intrinsic identifies the callsite value + associated with the following invoke instruction. This is used to ensure + that landing pad entries in the LSDA are generated in the matching order.
+ ++ void %llvm.eh.sjlj.dispatchsetup(i32) ++ +
For SJLJ based exception handling, the + llvm.eh.sjlj.dispatchsetup intrinsic is used by targets to do + any unwind-edge setup they need. By default, no action is taken.
+ +