Add a trivially simple pass to delete unreachable blocks from the CFG. This
authorChris Lattner <sabre@nondot.org>
Fri, 2 Jul 2004 05:46:10 +0000 (05:46 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 2 Jul 2004 05:46:10 +0000 (05:46 +0000)
commitfc3c82a804c9b5eda24d96c21f7e6ff66bc2c529
treec0fe3970de800277cc2ef1b7bdc86bb8b371b4c8
parent8b708e47525804909aba529faa9d2e2fa4895d72
Add a trivially simple pass to delete unreachable blocks from the CFG.  This
pass is required to paper over problems in the code generator (primarily
live variables and its clients) which doesn't really have any well defined
semantics for unreachable code.

The proper solution to this problem is to have instruction selectors not
select blocks that are unreachable.  Until we have a instruction selection
framework available for use, however, we can't expect all instruction
selector writers to do this.  Until then, this pass should be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14563 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/UnreachableBlockElim.cpp [new file with mode: 0644]