Kill some duplicated code for removing unreachable BBs.
authorPeter Collingbourne <peter@pcc.me.uk>
Fri, 9 Aug 2013 22:47:24 +0000 (22:47 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Fri, 9 Aug 2013 22:47:24 +0000 (22:47 +0000)
commit835738ce54edb4746cfa4cdfc76608fec03fab3a
tree9779f15e32d20228d7528ca356b2b82e524f7e0e
parentaaae6e9cb8c8567409739d7cde1c5caaf35810cf
Kill some duplicated code for removing unreachable BBs.

This moves removeUnreachableBlocksFromFn from SimplifyCFGPass.cpp
to Utils/Local.cpp and uses it to replace the implementation of
llvm::removeUnreachableBlocks, which appears to do a strict subset
of what removeUnreachableBlocksFromFn does.

Differential Revision: http://llvm-reviews.chandlerc.com/D1334

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188119 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SimplifyCFGPass.cpp
lib/Transforms/Utils/Local.cpp
test/Instrumentation/DataFlowSanitizer/args-unreachable-bb.ll