Delete dead PHI nodes in a block and recursively dead operands.
Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>
bool
DeleteDeadPHIs(
BasicBlock* BB,
TargetLibraryInfo const* TLI = nullptr,
MemorySSAUpdater* MSSAU = nullptr,
SmallPtrSetImpl<PHINode*>* KnownNonDeadPHIs = nullptr);
Examine each PHI in the given block and delete it if it is dead. Also recursively delete any operands that become dead as a result. This includes tracing the def-use list from the PHI to see if it is ultimately unused or if it reaches an unused cycle. Return true if any PHIs were deleted.
True if any PHI nodes were deleted.
| Name | Description |
|---|---|
| BB | Block whose PHI nodes may be deleted. |
| TLI | Optional target library info for deadness analysis. |
| MSSAU | Optional MemorySSA updater notified of deletions. |
| KnownNonDeadPHIs | Optional set of PHIs known not to be dead. |