llvm::hasValidBranchWeightMD

Checks if an instructions has valid Branch Weight Metadata

Synopsis

Declared in <llvm/IR/ProfDataUtils.h>

bool
hasValidBranchWeightMD(Instruction const& I);

Return Value

True if I has an MD_prof node containing valid Branch Weights, i.e., one weight for each successor. False otherwise.

Parameters

NameDescription
IThe instruction to check