Intelligently split the landing pad block.
authorBill Wendling <isanbard@gmail.com>
Fri, 19 Aug 2011 00:09:22 +0000 (00:09 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 19 Aug 2011 00:09:22 +0000 (00:09 +0000)
commitb29ec0642153c4b820d3814d30ddd33e763076f2
treeffc6baffd1309f4ebe924ce8b6e43ac7a866598e
parent7e8840c4d9ac7cc259fd967d9fe7540740d1ce92
Intelligently split the landing pad block.

We have to be careful when splitting the landing pad block, because the
landingpad instruction is required to remain as the first non-PHI of an invoke's
unwind edge. To retain this, we split the block into two blocks, moving the
predecessors within the loop to one block and the remaining predecessors to the
other. The landingpad instruction is cloned into the new blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138015 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopSimplify.cpp