LLVM 20.0.0git
|
#include "llvm/Transforms/Instrumentation/LowerAllowCheckPass.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/ProfileSummaryInfo.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/RandomNumberGenerator.h"
#include <memory>
#include <random>
Go to the source code of this file.
Classes | |
struct | RemarkInfo |
Macros | |
#define | DEBUG_TYPE "lower-allow-check" |
Functions | |
STATISTIC (NumChecksTotal, "Number of checks") | |
STATISTIC (NumChecksRemoved, "Number of removed checks") | |
static void | emitRemark (IntrinsicInst *II, OptimizationRemarkEmitter &ORE, bool Removed) |
static bool | removeUbsanTraps (Function &F, const BlockFrequencyInfo &BFI, const ProfileSummaryInfo *PSI, OptimizationRemarkEmitter &ORE) |
Variables | |
static cl::opt< int > | HotPercentileCutoff ("lower-allow-check-percentile-cutoff-hot", cl::desc("Hot percentile cuttoff.")) |
static cl::opt< float > | RandomRate ("lower-allow-check-random-rate", cl::desc("Probability value in the range [0.0, 1.0] of " "unconditional pseudo-random checks.")) |
#define DEBUG_TYPE "lower-allow-check" |
Definition at line 30 of file LowerAllowCheckPass.cpp.
|
static |
Definition at line 54 of file LowerAllowCheckPass.cpp.
References DEBUG_TYPE, llvm::OptimizationRemarkEmitter::emit(), II, and Info.
Referenced by removeUbsanTraps().
|
static |
Definition at line 73 of file LowerAllowCheckPass.cpp.
References emitRemark(), llvm::SmallVectorBase< Size_T >::empty(), F, llvm::ConstantInt::getBool(), HotPercentileCutoff, I, II, llvm::ProfileSummaryInfo::isHotCountNthPercentile(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), RandomRate, and ToRemove.
Referenced by llvm::LowerAllowCheckPass::run().
STATISTIC | ( | NumChecksRemoved | , |
"Number of removed checks" | |||
) |
STATISTIC | ( | NumChecksTotal | , |
"Number of checks" | |||
) |
|
static |
Referenced by llvm::LowerAllowCheckPass::IsRequested(), and removeUbsanTraps().
|
static |
Referenced by llvm::LowerAllowCheckPass::IsRequested(), and removeUbsanTraps().