[PATCH] D24117: Fix inliner funclet unwind memoization

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 18:50:29 PDT 2016

JosephTremoulet created this revision.
JosephTremoulet added a reviewer: majnemer.
JosephTremoulet added a subscriber: llvm-commits.

The inliner may need to determine where a given funclet unwinds to,
and this determination may depend on other funclets throughout the
funclet tree.  The code that performs this walk in getUnwindDestToken
memoizes results to avoid redundant computations.  In the case that
a funclet's unwind destination is derived from its ancestor, there's
code to walk back down the tree from the ancestor updating the memo
map of its descendants to record the unwind destination.  This change
fixes that code to account for the case that some descendant has a
different unwind destination, which can happen if that unwind dest
is a descendant of the EHPad being queried and thus didn't determine
its unwind destination.

Also update test inline-funclets.ll, which is supposed to cover such
scenarios, to include a case that fails an assertion without this fix
but passes with it.

Fixes PR29151.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24117.69942.patch
Type: text/x-patch
Size: 10912 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160901/b0a6dfc5/attachment.bin>

More information about the llvm-commits mailing list