llvm::changeToUnreachable

Insert unreachable before an instruction and make the rest of the block dead.

Synopsis

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

unsigned int
changeToUnreachable(
    Instruction* I,
    bool PreserveLCSSA = false,
    DomTreeUpdater* DTU = nullptr,
    MemorySSAUpdater* MSSAU = nullptr);

Return Value

Number of instructions made unreachable or removed.

Parameters

NameDescription
IInstruction before which unreachable is inserted.
PreserveLCSSAWhether to preserve LCSSA form while rewriting.
DTUOptional dominator-tree updater for CFG changes.
MSSAUOptional MemorySSA updater for deleted instructions.