llvm::isGuaranteedToTransferExecutionToSuccessor

Return true if instruction I always transfers execution to a successor.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

bool
isGuaranteedToTransferExecutionToSuccessor(Instruction const* I);

Description

This includes the next instruction that follows within a basic block. E.g. this is not guaranteed for function calls that could loop infinitely.

In other words, this function returns false for instructions that may transfer execution or fail to transfer execution in a way that is not captured in the CFG nor in the sequence of instructions within a basic block.

Undefined behavior is assumed not to happen, so e.g. division is guaranteed to transfer execution to the following instruction even though division by zero might cause undefined behavior.

Return Value

True if I is guaranteed to transfer execution to a successor.

Parameters

NameDescription
IInstruction to test.