llvm::getValidBranchWeightMDNode

Get the valid branch weights metadata node

Synopsis

Declared in <llvm/IR/ProfDataUtils.h>

MDNode*
getValidBranchWeightMDNode(Instruction const& I);

Return Value

A pointer to I's valid branch weights metadata node, if it exists. Nullptr otherwise.

Parameters

NameDescription
IThe Instruction to get the weights from.