ΒΆvoid checkFrontendInstrumentation(
llvm::Instruction& I,
const ArrayRef<uint32_t> ExpectedWeights)
void checkFrontendInstrumentation(
llvm::Instruction& I,
const ArrayRef<uint32_t> ExpectedWeights)
Description
checkFrontendInstrumentation - 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 profiling data attached by the frontend prior to llvm.expect intrinsic lowering. The ExpectedWeights parameter and the extracted real weights are then passed to verifyMisexpect() for verification
Declared at: llvm/include/llvm/Transforms/Utils/MisExpect.h:51
Parameters
- llvm::Instruction& I
- The Instruction being checked
- const ArrayRef<uint32_t> ExpectedWeights
- A vector of the expected weights for each target block, this determines the threshold values used when emiting diagnostics