llvm::extractFromBranchWeightMD32

Faster version of extractBranchWeights() that skips checks and must only be called with "branch_weights" metadata nodes. Supports uint32_t.

Synopsis

Declared in <llvm/IR/ProfDataUtils.h>

void
extractFromBranchWeightMD32(
    MDNode const* ProfileData,
    SmallVectorImpl<uint32_t>& Weights);

Parameters

NameDescription
ProfileDataA pointer to a "branch_weights" MDNode.
Weights [out]An output vector to fill with branch weights