LLVM 20.0.0git
Classes | Macros | Functions | Variables
LowerAllowCheckPass.cpp File Reference
#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."))
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "lower-allow-check"

Definition at line 30 of file LowerAllowCheckPass.cpp.

Function Documentation

◆ emitRemark()

static void emitRemark ( IntrinsicInst II,
OptimizationRemarkEmitter ORE,
bool  Removed 
)
static

Definition at line 54 of file LowerAllowCheckPass.cpp.

References DEBUG_TYPE, llvm::OptimizationRemarkEmitter::emit(), II, and Info.

Referenced by removeUbsanTraps().

◆ removeUbsanTraps()

static bool removeUbsanTraps ( Function F,
const BlockFrequencyInfo BFI,
const ProfileSummaryInfo PSI,
OptimizationRemarkEmitter ORE 
)
static

◆ STATISTIC() [1/2]

STATISTIC ( NumChecksRemoved  ,
"Number of removed checks"   
)

◆ STATISTIC() [2/2]

STATISTIC ( NumChecksTotal  ,
"Number of checks"   
)

Variable Documentation

◆ HotPercentileCutoff

cl::opt< int > HotPercentileCutoff("lower-allow-check-percentile-cutoff-hot", cl::desc("Hot percentile cuttoff.")) ( "lower-allow-check-percentile-cutoff-hot"  ,
cl::desc("Hot percentile cuttoff.")   
)
static

◆ RandomRate

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.")) ( "lower-allow-check-random-rate"  ,
cl::desc("Probability value in the range [0.0, 1.0] of " "unconditional pseudo-random checks.")   
)
static