llvm::getExplicitlyUnknownBranchWeightsIfProfiled

Returns a metadata node containing unknown branch weights if the function has an entry count, otherwise returns nullptr.

Synopsis

Declared in <llvm/IR/ProfDataUtils.h>

MDNode*
getExplicitlyUnknownBranchWeightsIfProfiled(
    Function& F,
    StringRef PassName);

Return Value

A metadata node with unknown branch weights if F has an entry count; nullptr otherwise.

Parameters

NameDescription
FThe function whose entry count is checked.
PassNameThe pass name (typically DEBUG_TYPE) recorded for debugging.