LLVM 20.0.0git
Classes | Macros | Functions | Variables
GlobalsModRef.cpp File Reference
#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/MemoryBuiltins.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"

Go to the source code of this file.

Classes

class  llvm::GlobalsAAResult::FunctionInfo
 The mod/ref information collected for a particular function. More...
 

Macros

#define DEBUG_TYPE   "globalsmodref-aa"
 

Functions

 STATISTIC (NumNonAddrTakenGlobalVars, "Number of global vars without address taken")
 
 STATISTIC (NumNonAddrTakenFunctions,"Number of functions without address taken")
 
 STATISTIC (NumNoMemFunctions, "Number of functions that do not access memory")
 
 STATISTIC (NumReadMemFunctions, "Number of functions that only read memory")
 
 STATISTIC (NumIndirectGlobalVars, "Number of indirect global objects")
 
static bool isNonEscapingGlobalNoAliasWithLoad (const GlobalValue *GV, const Value *V, int &Depth, const DataLayout &DL)
 
 INITIALIZE_PASS_BEGIN (GlobalsAAWrapperPass, "globals-aa", "Globals Alias Analysis", false, true) INITIALIZE_PASS_END(GlobalsAAWrapperPass
 

Variables

static cl::opt< boolEnableUnsafeGlobalsModRefAliasResults ("enable-unsafe-globalsmodref-alias-results", cl::init(false), cl::Hidden)
 
globals aa
 
globals Globals Alias Analysis
 
globals Globals Alias false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "globalsmodref-aa"

Definition at line 34 of file GlobalsModRef.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( GlobalsAAWrapperPass  ,
"globals-aa"  ,
"Globals Alias Analysis"  ,
false  ,
true   
)

◆ isNonEscapingGlobalNoAliasWithLoad()

static bool isNonEscapingGlobalNoAliasWithLoad ( const GlobalValue GV,
const Value V,
int &  Depth,
const DataLayout DL 
)
static

◆ STATISTIC() [1/5]

STATISTIC ( NumIndirectGlobalVars  ,
"Number of indirect global objects"   
)

◆ STATISTIC() [2/5]

STATISTIC ( NumNoMemFunctions  ,
"Number of functions that do not access memory"   
)

◆ STATISTIC() [3/5]

STATISTIC ( NumNonAddrTakenFunctions  ,
"Number of functions without address taken"   
)

◆ STATISTIC() [4/5]

STATISTIC ( NumNonAddrTakenGlobalVars  ,
"Number of global vars without address taken"   
)

◆ STATISTIC() [5/5]

STATISTIC ( NumReadMemFunctions  ,
"Number of functions that only read memory"   
)

Variable Documentation

◆ aa

globals aa

Definition at line 1029 of file GlobalsModRef.cpp.

◆ Analysis

globals Globals Alias Analysis

Definition at line 1030 of file GlobalsModRef.cpp.

◆ EnableUnsafeGlobalsModRefAliasResults

cl::opt< bool > EnableUnsafeGlobalsModRefAliasResults("enable-unsafe-globalsmodref-alias-results", cl::init(false), cl::Hidden) ( "enable-unsafe-globalsmodref-alias-results"  ,
cl::init(false)  ,
cl::Hidden   
)
static

◆ false

globals Globals Alias false

Definition at line 1030 of file GlobalsModRef.cpp.