A machine basic block may end in an unconditional branch, however it may have
authorBill Wendling <isanbard@gmail.com>
Fri, 11 Dec 2009 01:49:14 +0000 (01:49 +0000)
committerBill Wendling <isanbard@gmail.com>
Fri, 11 Dec 2009 01:49:14 +0000 (01:49 +0000)
commit4bde1ab82d4a520dca59db1fd212d77ac667b3a8
tree8a324c08758ee0b1ef5b55a3aa75e02b30c27e11
parent5278eb802fae2ee1a7b2a428596bc364d8bcd9db
A machine basic block may end in an unconditional branch, however it may have
more than one successor. Normally, these extra successors are dead. However,
some of them may branch to exception handling landing pads. If we remove those
successors, then the landing pads could go away if all predecessors to it are
removed. Before, it was checking if the direct successor was the landing
pad. But it could be the result of jumping through multiple basic blocks to get
to it. If we were to only check for the existence of an EH_LABEL in the basic
block and not remove successors if it's in there, then it could stop actually
dead basic blocks from being removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91092 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineBasicBlock.h
lib/CodeGen/MachineBasicBlock.cpp