[LLVMdev] Whither exceptions

Chris Lattner sabre at nondot.org
Thu Dec 20 09:47:08 PST 2007


On Thu, 20 Dec 2007, Duncan Sands wrote:
> Hi Dale,
>> If these were visible to end users I would not like exposing sjlj, an  
>> implementation detail; however my understanding is that they aren't.   
>> On the basis that they're intended for use by llvm geeks, I think  
>> either of these is an improvement, except in the second case I think  
>> the default should be target-dependent.  Comments?

> How about having -enable-eh turn on dwarf eh on all targets (including
> those that don't support it, in which case intrinsics get lowered to
> nothing much IIRC), and also have it cause a LowerInvoke pass to be run
> on targets that do not support dwarf eh.

This also makes sense to me.  The disadvantage being that you can only 
access one EH model for each target this way.  With -eh-model={foo} you 
can pick.

> support dwarf eh).  The testsuite can thus just use -enable-eh.  If you
> don't want eh at all then don't pass -enable-eh.  If you only want eh
> on targets that support dwarf eh then you can pass -enable-eh 
> -disable-eh-emulation.

Ok, so it sounds like you want a way to "enable the default eh model", and 
I want the ability to pick for "power users".  How about something like:

  <nothing>          -> eh disabled (aka -fno-exceptions in gcc)
  -enable-eh         -> target default
  -enable-eh=default -> target default
  -enable-eh=sjlj
  -enable-eh=dwarf

?

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/


More information about the llvm-dev mailing list