Replace every block in BBs with a single unreachable instruction.
Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>
void
detachDeadBlocks(
ArrayRef<BasicBlock*> BBs,
SmallVectorImpl<DominatorTree::UpdateType>* Updates,
bool KeepOneInputPHIs = false);
If Updates is specified, collect all necessary DT updates into this vector. If KeepOneInputPHIs is true, one-input Phis in successors of blocks being deleted will be preserved.
| Name | Description |
|---|---|
| BBs | Blocks whose contents are replaced with unreachable. |
| Updates | Optional vector that receives dominator-tree updates. |
| KeepOneInputPHIs | Whether to preserve one-input PHIs in successors. |