[LLVMdev] unwind/invoke design

Wesley W. Terpstra wesley at terpstra.ca
Mon Jun 15 14:55:24 PDT 2009


On Mon, Jun 15, 2009 at 9:40 PM, Duncan Sands<baldrick at free.fr> wrote:
> you can call the libgcc/libunwind routines directly.  There was an
> example of this on the mailing list by Talin not long ago.

I'll look into this. Thanks.

> That said,
> it wouldn't be too hard to support "unwind" in the code generators.
> It would basically mean creating thread-local storage to hold dwarf
> exception information, and turning "unwind" into some code to set up
> the info and call the appropriate libgcc routine.

Why does 'unwind' need to setup thread local storage at all? In my
opinion this is the responsibility of the frontend, not LLVM. All I
expect 'unwind' to do is unwind the stack down to the nearest 'unwind
label' of an invoke. Thread-local storage, global variable, or any
other approach one might think of to carry the exception information
is a frontend policy decision. Adding this support to 'unwind'
complicates its implementation and also dilutes its usefulness.




More information about the llvm-dev mailing list