[PATCH] D13718: [SimplifyCFG] Extend SimplifyResume to handle phi of trivial landing pad.

Chen Li via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 13 21:06:59 PDT 2015


chenli created this revision.
chenli added reviewers: hfinkel, reames.
chenli added a subscriber: llvm-commits.

Currently SimplifyResume can convert an invoke instruction to a call instruction if its landing pad is trivial. In practice we could have several invoke instructions with trivial landing pads and share a common rethrow block, and in the common rethrow block, all the landing pads join to a phi node. The patch extends SimplifyResume to check the phi of landing pad and their incoming blocks. If any of them is trivial, remove it from the phi node and convert the invoke instruction to a call instruction.  

http://reviews.llvm.org/D13718

Files:
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/Transforms/SimplifyCFG/invoke_unwind.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13718.37318.patch
Type: text/x-patch
Size: 4723 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151014/be30085b/attachment.bin>


More information about the llvm-commits mailing list