Delete all basic blocks in F that are unreachable from its entry.
Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>
bool
EliminateUnreachableBlocks(
Function& F,
DomTreeUpdater* DTU = nullptr,
bool KeepOneInputPHIs = false);
If KeepOneInputPHIs is true, one-input Phis in successors of blocks being deleted will be preserved.
True if any unreachable blocks were deleted.
| Name | Description |
|---|---|
| F | Function whose unreachable blocks are deleted. |
| DTU | Optional dominator-tree updater for CFG changes. |
| KeepOneInputPHIs | Whether to preserve one-input PHIs in successors. |