ΒΆvoid checkExpectAnnotations(
    llvm::Instruction& I,
    const ArrayRef<uint32_t> ExistingWeights,
    bool IsFrontend)

Description

checkExpectAnnotations - compares PGO counters to the thresholds used for llvm.expect and warns if the PGO counters are outside of the expected range. It extracts the expected weights from the MD_prof weights attatched to the instruction, which are are assumed to come from lowered llvm.expect intrinsics. The RealWeights parameter and the extracted expected weights are then passed to verifyMisexpect() for verification. It is a thin wrapper around the checkFrontendInstrumentation and checkBackendInstrumentation APIs

Declared at: llvm/include/llvm/Transforms/Utils/MisExpect.h:75

Parameters

llvm::Instruction& I
The Instruction being checked
const ArrayRef<uint32_t> ExistingWeights
bool IsFrontend