[llvm-commits] [patch] Change how we handle mandatory unwind tables

Rafael Avila de Espindola rafael.espindola at gmail.com
Tue May 24 12:00:14 PDT 2011


>> Unfortunately, I do think I need the 4 possible values. What should the
>> optimizer do to mark a uwtables that it was able to show doesn't throw?
>
> I think the nounwind flag should continue to exist independently as it does
> now: it is not a codegen flag: it describes the semantics of executing the
> IR: no exceptions will be unwound.  The fact that it can be defined without
> any mention of how code is generated proves that it is not a codegen flag :)

Agreed!

> That's not to say that it has no impact on what codegen does: if the code
> generators see the nounwind flag they can try to produce more optimal code
> by exploiting that.  For example, they can not bother producing unwind tables.

So, what I don't understand now is why do I need a three state then? If 
keeping nounwind as is, I only need one bit more to tell me if the user 
or the ABI requires me to produce an unwind table entry.

I have attached the llvm, clang and llvm-gcc patches changing the 
attribute name to uwtable to avoid the "eh" in it. I have also added 
more comments.

> Ciao, Duncan.

Thanks,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm.patch
Type: text/x-patch
Size: 11241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110524/bf76d3ec/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.patch
Type: text/x-patch
Size: 1108 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110524/bf76d3ec/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-gcc.patch
Type: text/x-patch
Size: 927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110524/bf76d3ec/attachment-0002.bin>


More information about the llvm-commits mailing list