llvm::RecursivelyDeleteTriviallyDeadInstructions

RecursivelyDeleteTriviallyDeadInstructions overloads

Synopses

Declared in <llvm/Transforms/Utils/Local.h>

Recursively delete a worklist of trivially dead instructions.

void
RecursivelyDeleteTriviallyDeadInstructions(
    SmallVectorImpl<WeakTrackingVH>& DeadInsts,
    TargetLibraryInfo const* TLI = nullptr,
    MemorySSAUpdater* MSSAU = nullptr,
    std::function<void(Value*)> AboutToDeleteCallback = std::function<void(Value *)>());
» more...

Recursively delete a trivially dead instruction and its dead operands.

bool
RecursivelyDeleteTriviallyDeadInstructions(
    Value* V,
    TargetLibraryInfo const* TLI = nullptr,
    MemorySSAUpdater* MSSAU = nullptr,
    std::function<void(Value*)> AboutToDeleteCallback = std::function<void(Value *)>());
» more...

Return Value

True if any instructions were deleted.

Parameters

NameDescription
DeadInstsWorklist of trivially dead instructions to delete.
TLIOptional target library info used for deadness analysis.
MSSAUOptional MemorySSA updater notified of deletions.
AboutToDeleteCallbackOptional callback invoked before each deletion.
VValue that may be a trivially dead instruction.