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

Duncan Sands baldrick at free.fr
Tue May 24 08:25:42 PDT 2011


Hi Rafael,

> I like not having "eh" in the flag name. The main reason for having abi
> mandated unwind tables is so the external tools can cause an unwind at
> any time.

well that fits into the tri-state scheme too, which is a general scheme for
handling codegen options that need to be mentioned in the IR.

> 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 :)
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.

Ciao, Duncan.



More information about the llvm-commits mailing list