[LLVMdev] RFC: Exception Handling Proposal Revised

Bill Wendling wendling at apple.com
Wed Dec 1 01:46:20 PST 2010


On Dec 1, 2010, at 1:12 AM, Renato Golin wrote:
> On 1 December 2010 07:04, Bill Wendling <wendling at apple.com> wrote:
>> The unwind edge from an invoke instruction jumps to a landing pad. That landing pad contains code which performs optional cleanups, and then determines which catch handler to call (if any).  If no catch handlers are applicable, the exception resumes propagation either to the next enclosing region or out of the function.
> 
> Hi Bill,
> 
> Looking good already! ;)
> 
Thanks!

>> ch.int:
> 
> shouldn't the catch handlers have "landingpad" attributes?
> 
I don't think they need it.

>> ;; C's d'tor
>> c.dtor:
> 
> and the cleanups?
> 
Nor these. Basically, I want the basic block that's labeled a "landing pad" to be jumped to by only a dispatch resume or unwind edge of invoke. We could do this with the c.dtor and ch.int here, but it would mean inserting useless "cleanup dispatches" that only resume to the block (see onto.catch.handlers for an example).

>> yikes:
>>  call void @_ZSt9terminatev() noreturn nounwind
>>  unreachable
> 
> and yikes?
> 
> Can we standardize "yikes" as the official terminate handler name? :D
> 
I wish! :-D

>> Well? What do you think? Pretty cool, eh? :-)
> 
> Yup. I think it's much more clear than the current scheme, at least
> for C++ Itanium ABI (AFAICS).
> 
> Can anyone try an Ada (or any other language) example to see if it
> makes sense for them, too?
> 
*Looks at Duncan*

-bw






More information about the llvm-dev mailing list