Fold away single-entry PHI nodes in a block with one predecessor.
Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>
bool
FoldSingleEntryPHINodes(
BasicBlock* BB,
MemoryDependenceResults* MemDep = nullptr);
We know that BB has one predecessor. If there are any single-entry PHI nodes in it, fold them away. This handles the case when all entries to the PHI nodes in a block are guaranteed equal, such as when the block has exactly one predecessor.
True if any single-entry PHI nodes were folded away.
| Name | Description |
|---|---|
| BB | Block whose single-entry PHIs may be folded. |
| MemDep | Optional memory-dependence results to update. |