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.
Declared in <llvm/Transforms/Utils/BasicBlockUtils.h>
bool
DeleteDeadPHIs(
BasicBlock* BB,
TargetLibraryInfo const* TLI = nullptr,
MemorySSAUpdater* MSSAU = nullptr,
SmallPtrSetImpl<PHINode*>* KnownNonDeadPHIs = nullptr);
| Name | Description |
|---|---|
| BB | LLVM Basic Block Representation |
| TLI | Provides information about what library functions are available for the current target. |
| KnownNonDeadPHIs | A templated base class for SmallPtrSet which provides the typesafe interface that is common across all small sizes. |