[PATCH] Fix inlining to not produce duplicate landingpad clauses

Mark Seaborn mseaborn at chromium.org
Sun Nov 24 12:35:57 PST 2013


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131124/e7ec46b2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: landingpad_inlining_fix.patch
Type: text/x-patch
Size: 8882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131124/e7ec46b2/attachment.bin>


More information about the llvm-commits mailing list