Teach SplitBlockPredecessors how to handle landingpad blocks.
authorPhilip Reames <listmail@philipreames.com>
Wed, 28 Jan 2015 23:06:47 +0000 (23:06 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 28 Jan 2015 23:06:47 +0000 (23:06 +0000)
commit61a76b2d4a7eef4df382ea2aceab45c3f83d3283
tree4b3c86f1118097c9e09411ee018e50dd10b4bf0b
parent408796c672ab95e9fbe697d48f6b1311a60218cd
Teach SplitBlockPredecessors how to handle landingpad blocks.

Patch by: Igor Laevsky <igor@azulsystems.com>

"Currently SplitBlockPredecessors generates incorrect code in case if basic block we are going to split has a landingpad. Also seems like it is fairly common case among it's users to conditionally call either SplitBlockPredecessors or SplitLandingPadPredecessors. Because of this I think it is reasonable to add this condition directly into SplitBlockPredecessors."

Differential Revision: http://reviews.llvm.org/D7157

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227390 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/BasicBlockUtils.h
lib/Transforms/Scalar/LoopUnswitch.cpp
lib/Transforms/Utils/BasicBlockUtils.cpp
lib/Transforms/Utils/LoopSimplify.cpp
lib/Transforms/Utils/LoopUnrollRuntime.cpp
test/Transforms/LoopSimplify/2011-12-14-LandingpadHeader.ll