[LLVMdev] "Mapping High-Level Constructs to LLVM IR"

Yaron Keren yaron.keren at gmail.com
Sat Nov 23 12:41:25 PST 2013


There are overviews of Dwarf EH in the gcc wiki

 http://gcc.gnu.org/wiki/Dwarf2EHNewbiesHowto

and in Mortoray blog

 http://mortoray.com/2013/09/12/the-true-cost-of-zero-cost-exceptions/
 http://mortoray.com/2012/03/08/the-necessity-of-exceptions/
 http://mortoray.com/2012/04/02/everything-wrong-with-exceptions/



2013/11/23 Joshua Cranmer <pidgeot18 at gmail.com>

> On 11/23/2013 12:18 AM, Mikael Lyngvig wrote:
>
>> Thanks, you have a lot of valid points there.  I have myself long ago
>> abandoned the path of using C as a backend language due to the very factors
>> you mention.
>>
>> However, as I said, the document was put together in 30 minutes.  Not
>> exactly ready for prime time :-)
>>
>> I do agree that all of the things you mention should be described,
>> including Lambdas, closures, and generators, but I must admit up front that
>> I don't know how to implement half of them.  But I suppose I could do a lot
>> of research and perhaps occasionally ask you guys for specifics.
>>
>> We are not going to find much common ground on the issue of "calling
>> propagated return values for exception handling", I think :-)  See
>> https://www.lyngvig.org/Teknik/A-Proposal-for-Exception-Handling-in-Cfor the details.
>>
>
> That appears to be comparing return value propagation to setjmp/longjmp,
> which is not considered a good exception handling model. Most low-cost (or
> no-cost!) exception handling mechanisms are based on an unwind approach,
> where a thrown exception causes the stack trace to be inspected to find the
> appropriate catch block. If exceptions are not thrown, there is no
> execution cost to setting up a try/catch block, although this is paid for
> by a relatively expensive throw implementation. Details of such an
> implementation can be found in the Itanium ABI <
> http://mentorembedded.github.io/cxx-abi/abi-eh.html> (which, despite its
> name, is the ABI used by gcc and clang).
>
> --
> Joshua Cranmer
> News submodule owner
> DXR coauthor
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131123/6bc5bb51/attachment.html>


More information about the llvm-dev mailing list