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 attached to the instruction, which 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

Synopsis

Declared in <llvm/Transforms/Utils/MisExpect.h>

void
checkFrontendInstrumentation(
    Instruction const& I,
    ArrayRef<uint32_t> ExpectedWeights);

Parameters

Name

Description

I

The Instruction being checked

ExpectedWeights

A vector of the expected weights for each target block, this determines the threshold values used when emitting diagnostics

Created with MrDocs