[llvm] r176827 - Don't remove a landing pad if the invoke requires a table entry.

Bill Wendling wendling at apple.com
Wed Mar 13 10:38:44 PDT 2013


On Mar 13, 2013, at 1:14 AM, Duncan Sands <baldrick at free.fr> wrote:

> Hi Bill,
> 
> On 13/03/13 03:39, Bill Wendling wrote:
>> On Mar 12, 2013, at 5:26 AM, Duncan Sands <baldrick at free.fr> wrote:
>> 
>>> Hi Bill,
>>> 
>>>> Don't remove a landing pad if the invoke requires a table entry.
>>>> 
>>>> An invoke may require a table entry. For instance, when the function it calls
>>>> is expected to throw.
>>>> <rdar://problem/13360379>
>>> 
>>> how about doing this at the codegen level instead?  I.e. in codegen, generate an
>>> entry in the exception table when the callee has the UWTable attribute even if
>>> it isn't an invoke.
>>> 
>> I'm not a huge fan of that. There is already a lot of code in place to handle generating these tables entries if the invokes exist without adding special code to force their generation on calls. I felt that this was the most non-invasive change...
>> 
>> Is there a reason you prefer moving this to the back-end?
> 
> well, invokes and landing pads reduce the amount of optimization you can do.
> But now I come to think about it, I don't understand the reason for this patch.
> Why is it relevant to anything that the callee has the uwtable attribute?
> 
According to the comments in the Attributes.h file, if the callee has the uwtable attribute then it requires an entry into the EH table. If we remove the invoke, then there will be no entry added to the EH table.

-bw





More information about the llvm-commits mailing list