Recursively delete a trivially dead instruction and its dead operands.
Declared in <llvm/Transforms/Utils/Local.h>
bool
RecursivelyDeleteTriviallyDeadInstructions(
Value* V,
TargetLibraryInfo const* TLI = nullptr,
MemorySSAUpdater* MSSAU = nullptr,
std::function<void(Value*)> AboutToDeleteCallback = std::function<void(Value *)>());
If the specified value is a trivially dead instruction, delete it. If that makes any of its operands trivially dead, delete them too, recursively. Return true if any instructions were deleted.
True if any instructions were deleted.
| Name | Description |
|---|---|
| V | Value that may be a trivially dead instruction. |
| TLI | Optional target library info used for deadness analysis. |
| MSSAU | Optional MemorySSA updater notified of deletions. |
| AboutToDeleteCallback | Optional callback invoked before each deletion. |