[PATCH] Fix inlining to not produce duplicate landingpad clauses
Mark Seaborn
mseaborn at chromium.org
Thu Dec 5 15:32:49 PST 2013
Hi void, chandlerc,
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.
http://llvm-reviews.chandlerc.com/D2342
Files:
lib/Transforms/Utils/InlineFunction.cpp
test/Transforms/Inline/inline_invoke.ll
test/Transforms/Inline/invoke-combine-clauses.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2342.1.patch
Type: text/x-patch
Size: 8524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131205/b413a589/attachment.bin>
More information about the llvm-commits
mailing list