ΒΆvoid checkBackendInstrumentation(
    llvm::Instruction& I,
    const llvm::ArrayRef<uint32_t> RealWeights)

Description

checkBackendInstrumentation - 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

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

Parameters

llvm::Instruction& I
The Instruction being checked
const llvm::ArrayRef<uint32_t> RealWeights
A vector of profile weights for each target block