]> granicus.if.org Git - llvm/commit
[Utils] Extract EliminateUnreachableBlocks (NFC)
authorBrian Gesiak <modocache@gmail.com>
Mon, 11 Mar 2019 17:51:57 +0000 (17:51 +0000)
committerBrian Gesiak <modocache@gmail.com>
Mon, 11 Mar 2019 17:51:57 +0000 (17:51 +0000)
commit905c1b120c707e256c525cc55ec73cb915d8ad74
tree023d9d42d2baa9ecf46f35c965e95c07a22502a4
parent4e3754ce697e9649f719ec7ff86d8c0b36f0c73c
[Utils] Extract EliminateUnreachableBlocks (NFC)

Summary:
Extract the functionality of eliminating unreachable basic blocks
within a function, previously encapsulated within the
-unreachableblockelim pass, and make it available as a function within
BlockUtils.h. No functional change intended other than making the logic
reusable.

Exposing this logic makes it easier to implement
https://reviews.llvm.org/D59068, which fixes coroutines bug
https://bugs.llvm.org/show_bug.cgi?id=40979.

Reviewers: mkazantsev, wmi, davidxl, silvas, davide

Reviewed By: davide

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59069

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355846 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/BasicBlockUtils.h
lib/CodeGen/UnreachableBlockElim.cpp
lib/Transforms/Utils/BasicBlockUtils.cpp
unittests/Transforms/Utils/BasicBlockUtilsTest.cpp