llvm::hasBranchWeightOrigin

Check if Branch Weight Metadata has an "expected" field from an llvm.expect* intrinsic

Synopses

Declared in <llvm/IR/ProfDataUtils.h>

Check if Branch Weight Metadata has an "expected" field from an llvm.expect* intrinsic

bool
hasBranchWeightOrigin(Instruction const& I);
» more...

Check if Branch Weight Metadata has an "expected" field from an llvm.expect* intrinsic

bool
hasBranchWeightOrigin(MDNode const* ProfileData);
» more...

Return Value

  • True if I has branch-weight metadata with an "expected" field from an llvm.expect* intrinsic. False otherwise.
  • True if ProfileData has an "expected" field from an llvm.expect* intrinsic. False otherwise.

Parameters

NameDescription
IThe instruction to check
ProfileDataThe MD_prof metadata node to inspect