LLVM 20.0.0git
Macros | Functions | Variables
ImplicitNullChecks.cpp File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/MemoryLocation.h"
#include "llvm/CodeGen/FaultMaps.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineMemOperand.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/PseudoSourceValue.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include <cassert>
#include <cstdint>
#include <iterator>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "implicit-null-checks"
 

Functions

 STATISTIC (NumImplicitNullChecks, "Number of explicit null checks made implicit")
 
static bool AnyAliasLiveIn (const TargetRegisterInfo *TRI, MachineBasicBlock *MBB, unsigned Reg)
 
 INITIALIZE_PASS_BEGIN (ImplicitNullChecks, DEBUG_TYPE, "Implicit null checks", false, false) INITIALIZE_PASS_END(ImplicitNullChecks
 

Variables

static cl::opt< int > PageSize ("imp-null-check-page-size", cl::desc("The page size of the target in bytes"), cl::init(4096), cl::Hidden)
 
static cl::opt< unsignedMaxInstsToConsider ("imp-null-max-insts-to-consider", cl::desc("The max number of instructions to consider hoisting loads over " "(the algorithm is quadratic over this number)"), cl::Hidden, cl::init(8))
 
 DEBUG_TYPE
 
Implicit null checks
 
Implicit null false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "implicit-null-checks"

Definition at line 72 of file ImplicitNullChecks.cpp.

Function Documentation

◆ AnyAliasLiveIn()

static bool AnyAliasLiveIn ( const TargetRegisterInfo TRI,
MachineBasicBlock MBB,
unsigned  Reg 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( ImplicitNullChecks  ,
DEBUG_TYPE  ,
"Implicit null checks"  ,
false  ,
false   
)

◆ STATISTIC()

STATISTIC ( NumImplicitNullChecks  ,
"Number of explicit null checks made implicit"   
)

Variable Documentation

◆ checks

Implicit null checks

Definition at line 818 of file ImplicitNullChecks.cpp.

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 817 of file ImplicitNullChecks.cpp.

◆ false

Implicit null false

Definition at line 818 of file ImplicitNullChecks.cpp.

◆ MaxInstsToConsider

cl::opt< unsigned > MaxInstsToConsider("imp-null-max-insts-to-consider", cl::desc("The max number of instructions to consider hoisting loads over " "(the algorithm is quadratic over this number)"), cl::Hidden, cl::init(8)) ( "imp-null-max-insts-to-consider"  ,
cl::desc("The max number of instructions to consider hoisting loads over " "(the algorithm is quadratic over this number)")  ,
cl::Hidden  ,
cl::init(8)   
)
static

◆ PageSize

cl::opt< int > PageSize("imp-null-check-page-size", cl::desc("The page size of the target in bytes"), cl::init(4096), cl::Hidden) ( "imp-null-check-page-size"  ,
cl::desc("The page size of the target in bytes")  ,
cl::init(4096)  ,
cl::Hidden   
)
static