llvm::RecursivelyDeleteTriviallyDeadInstructionsPermissive

Recursively delete trivially dead instructions from a permissive worklist.

Synopsis

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

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

Description

Same functionality as RecursivelyDeleteTriviallyDeadInstructions, but allow instructions that are not trivially dead. These will be ignored. Returns true if any changes were made, i.e. any instructions trivially dead were found and deleted.

Return Value

True if any trivially dead instructions were found and deleted.

Parameters

NameDescription
DeadInstsWorklist that may contain non-dead instructions.
TLIOptional target library info used for deadness analysis.
MSSAUOptional MemorySSA updater notified of deletions.
AboutToDeleteCallbackOptional callback invoked before each deletion.