|
LLVM
10.0.0
|
Functions | |
| void | verifyMisExpect (llvm::Instruction *I, const llvm::SmallVector< uint32_t, 4 > &Weights, llvm::LLVMContext &Ctx) |
| verifyMisExpect - compares PGO counters to the thresholds used for llvm.expect and warns if the PGO counters are outside of the expected range. More... | |
| void | checkFrontendInstrumentation (Instruction &I) |
| checkClangInstrumentation - verify if llvm.expect matches PGO profile This function checks the frontend instrumentation in the backend when lowering llvm.expect intrinsics. More... | |
| void llvm::misexpect::checkFrontendInstrumentation | ( | Instruction & | I | ) |
checkClangInstrumentation - verify if llvm.expect matches PGO profile This function checks the frontend instrumentation in the backend when lowering llvm.expect intrinsics.
It checks for existing metadata, and then validates the use of llvm.expect against the assigned branch weights.
| I | the Instruction being checked |
Definition at line 148 of file MisExpect.cpp.
References llvm::Value::getContext(), llvm::Instruction::getMetadata(), llvm::ConstantInt::getZExtValue(), and verifyMisExpect().
Referenced by handleSwitchExpect().
| void llvm::misexpect::verifyMisExpect | ( | llvm::Instruction * | I, |
| const llvm::SmallVector< uint32_t, 4 > & | Weights, | ||
| llvm::LLVMContext & | Ctx | ||
| ) |
verifyMisExpect - compares PGO counters to the thresholds used for llvm.expect and warns if the PGO counters are outside of the expected range.
| I | The Instruction being checked |
| Weights | A vector of profile weights for each target block |
| Ctx | The current LLVM context |
Definition at line 96 of file MisExpect.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::dbgs(), llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::Instruction::getFunction(), llvm::Instruction::getMetadata(), llvm::Value::getName(), LikelyBranchWeight, LLVM_DEBUG, Size, llvm::SmallVectorBase::size(), and UnlikelyBranchWeight.
Referenced by checkFrontendInstrumentation(), GetSortedValueDataFromCallTargets(), and llvm::setProfMetadata().
1.8.13