Recursively delete an effectively dead PHI and its dead operands.
Declared in <llvm/Transforms/Utils/Local.h>
bool
RecursivelyDeleteDeadPHINode(
PHINode* PN,
TargetLibraryInfo const* TLI = nullptr,
MemorySSAUpdater* MSSAU = nullptr,
SmallPtrSetImpl<PHINode*>* KnownNonDeadPHIs = nullptr);
If the specified value is an effectively dead PHI node, due to being a def-use chain of single-use nodes that either forms a cycle or is terminated by a trivially dead instruction, delete it. If that makes any of its operands trivially dead, delete them too, recursively. Return true if a change was made.
True if a change was made.
| Name | Description |
|---|---|
| PN | PHI node that may be effectively dead. |
| TLI | Optional target library info used for deadness analysis. |
| MSSAU | Optional MemorySSA updater notified of deletions. |
| KnownNonDeadPHIs | Optional set of PHIs known not to be dead. |