[PATCH] Fix inlining to not produce duplicate landingpad clauses

Chandler Carruth chandlerc at google.com
Tue Dec 3 15:25:39 PST 2013


Mind using phabricator? Makes the review much faster.

I'd rather someone more familiar with exception handling in LLVM review
this. I worry about it mostly because there were explicit tests for the
duplication that you've had to remove. While in the abstract your
description makes perfect sense and I have no idea why those were there, I
also don't know the EH side of LLVM very well at all. Bill is really the
perfect reviewer here I suspect. =]


On Tue, Dec 3, 2013 at 2:27 PM, Mark Seaborn <mseaborn at chromium.org> wrote:

> On 24 November 2013 12:35, Mark Seaborn <mseaborn at chromium.org> wrote:
>
>> Fix inlining to not produce duplicate landingpad clauses
>>
>> Before this change, inlining one "invoke" into outer "invoke" call
>> site can lead to the outer landingpad's catch/filter clauses being
>> copied multiple times into the resulting landingpad.  This happens:
>>
>>  * when the inlined function contains multiple "resume" instructions,
>>    because forwardResume() copies the clauses but is called multiple
>>    times;
>>
>>  * when the inlined function contains a "resume" and a "call", because
>>    HandleCallsInBlockInlinedThroughInvoke() copies the clauses but is
>>    redundant with forwardResume().
>>
>> Fix this by deduplicating the code.
>>
>> This problem doesn't lead to any incorrect execution; it's only
>> untidy.
>>
>> This change will make fixing PR17872 a little easier.
>>
>
> Ping.  Can someone review this change, please?  I am not really sure if
> this change is small enough to be committed without a pre-commit review
> (following http://llvm.org/docs/DeveloperPolicy.html#code-reviews), but
> I'd certainly prefer to have someone review it before committing.
>
> Cheers,
> Mark
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131203/da190127/attachment.html>


More information about the llvm-commits mailing list