LLVM 22.0.0git
|
#include "llvm/Transforms/Utils/MisExpect.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/ProfDataUtils.h"
#include "llvm/Support/BranchProbability.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FormatVariadic.h"
#include <algorithm>
#include <cstdint>
#include <functional>
#include <numeric>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "misexpect" |
Functions | |
static bool | isMisExpectDiagEnabled (const LLVMContext &Ctx) |
static uint32_t | getMisExpectTolerance (const LLVMContext &Ctx) |
static const Instruction * | getInstCondition (const Instruction *I) |
static void | emitMisexpectDiagnostic (const Instruction *I, LLVMContext &Ctx, uint64_t ProfCount, uint64_t TotalCount) |
Variables | |
static cl::opt< bool > | PGOWarnMisExpect ("pgo-warn-misexpect", cl::init(false), cl::Hidden, cl::desc("Use this option to turn on/off " "warnings about incorrect usage of llvm.expect intrinsics.")) |
static cl::opt< uint32_t > | MisExpectTolerance ("misexpect-tolerance", cl::init(0), cl::desc("Prevents emitting diagnostics when profile counts are " "within N% of the threshold..")) |
#define DEBUG_TYPE "misexpect" |
Definition at line 46 of file MisExpect.cpp.
|
static |
Definition at line 94 of file MisExpect.cpp.
References Cond, DEBUG_TYPE, llvm::OptimizationRemarkEmitter::emit(), llvm::formatv(), getInstCondition(), I, and isMisExpectDiagEnabled().
Referenced by llvm::misexpect::verifyMisExpect().
|
static |
Definition at line 73 of file MisExpect.cpp.
References assert(), B(), llvm::dyn_cast(), and I.
Referenced by emitMisexpectDiagnostic().
|
static |
Definition at line 68 of file MisExpect.cpp.
References MisExpectTolerance.
Referenced by llvm::misexpect::verifyMisExpect().
|
static |
Definition at line 64 of file MisExpect.cpp.
References PGOWarnMisExpect.
Referenced by emitMisexpectDiagnostic().
|
static |
Referenced by getMisExpectTolerance().
|
static |
Referenced by isMisExpectDiagEnabled().