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

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue May 24 07:07:12 PDT 2011


>> nil = implementation defined?
>> nounwind = ?
>> ehframes = always generate
>> ehframes + nounwuind = don't generate
>
> No. It is:
>
> nil = Needs an eh frame because an exception might pass by.
> nounwind = No need for a eh frame
> ehframe = Needs an eh frame because the ABI says so and because an
> exception might pass by.
> ehframe + nounwind = Needs an eh frame because the ABI says so.
>
> Optimizations can add nounwind. This allows an invoke to become a call
> for example. If the FE added ehframe, we still get the eh table. If it
> did not, adding nounwind removes the only reason why we had an eh table
> and it is not generated.

Thanks for suggesting the table btw. I will add it to the comments.

I think a good summary of why we should add ehframe is that with it the 
compiler knows *why* it needs to produce an eh table. That way 
optimizations can manipulate exceptions and the compiler still knows if 
an eh table is needed or not.

Cheers,
Rafael




More information about the llvm-commits mailing list