[LLVMdev] Exception Handling Tables Question

Bill Wendling isanbard at gmail.com
Thu Sep 17 02:55:49 PDT 2009


On Sep 16, 2009, at 6:50 AM, Duncan Sands wrote:

> Hi Bill,
>
>> The reason to ask this is that
>>> it could make the EH tables smaller and less cluttered if we  
>>> elide  those areas which we know don't throw (the functions called  
>>> are marked  'nounwind', etc.).
>> Sure, that's what the SawPotentiallyThrowing boolean is for.  It is
>> currently set for any call, but in fact needn't be set for 'nounwind'
>> calls.  When I wrote this stuff 'nounwind' information wasn't  
>> available
>> at the codegen level, which is why this isn't done.  In case you  
>> care,
>> doing this would not hurt Ada :)
>
> now I think about it further, I guess SawPotentiallyThrowing is not  
> for
> this exactly, you'll need to add some additional logic near this  
> place.
>
Yeah. The logic will need tweaking for sure. I'm also concerned about  
the _Unwind_resume() call. GCC emits a call site region for it in the  
exception table. We...kind of do that. It looks like it's being  
included in one of the "this is a region which isn't in a try-catch  
block, but it has a call in it, so lets add it to the exception table"  
areas. If I implement my suggestion, this will likely go away. I think  
Eric's working on something that will add the _Unwind_resume() call  
during selection DAG time, where we can place EH labels around it. But  
it's just another thing I have to worry about when doing this. :-)

-bw




More information about the llvm-dev mailing list