LLVM  11.0.0git
Classes | Macros | Functions | Variables
StackSafetyAnalysis.cpp File Reference
#include "llvm/Analysis/StackSafetyAnalysis.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/ModuleSummaryAnalysis.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/StackLifetime.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <memory>
Include dependency graph for StackSafetyAnalysis.cpp:

Go to the source code of this file.

Classes

struct  llvm::StackSafetyInfo::InfoTy
 
struct  llvm::StackSafetyGlobalInfo::InfoTy
 

Macros

#define DEBUG_TYPE   "stack-safety"
 

Functions

 STATISTIC (NumAllocaStackSafe, "Number of safe allocas")
 
 STATISTIC (NumAllocaTotal, "Number of total allocas")
 
 INITIALIZE_PASS_BEGIN (StackSafetyInfoWrapperPass, LocalPassArg, LocalPassName, false, true) INITIALIZE_PASS_END(StackSafetyInfoWrapperPass
 
 INITIALIZE_PASS_BEGIN (StackSafetyGlobalInfoWrapperPass, DEBUG_TYPE, GlobalPassName, false, true) INITIALIZE_PASS_END(StackSafetyGlobalInfoWrapperPass
 

Variables

static cl::opt< int > StackSafetyMaxIterations ("stack-safety-max-iterations", cl::init(20), cl::Hidden)
 
static cl::opt< boolStackSafetyPrint ("stack-safety-print", cl::init(false), cl::Hidden)
 
static cl::opt< boolStackSafetyRun ("stack-safety-run", cl::init(false), cl::Hidden)
 
static const char LocalPassArg [] = "stack-safety-local"
 
static const char LocalPassName [] = "Stack Safety Local Analysis"
 
 false
 
static true const char GlobalPassName [] = "Stack Safety Analysis"
 
 DEBUG_TYPE
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "stack-safety"

Definition at line 35 of file StackSafetyAnalysis.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN() [1/2]

INITIALIZE_PASS_BEGIN ( StackSafetyInfoWrapperPass  ,
LocalPassArg  ,
LocalPassName  ,
false  ,
true   
)

◆ INITIALIZE_PASS_BEGIN() [2/2]

INITIALIZE_PASS_BEGIN ( StackSafetyGlobalInfoWrapperPass  ,
DEBUG_TYPE  ,
GlobalPassName  ,
false  ,
true   
)

◆ STATISTIC() [1/2]

STATISTIC ( NumAllocaStackSafe  ,
"Number of safe allocas"   
)

◆ STATISTIC() [2/2]

STATISTIC ( NumAllocaTotal  ,
"Number of total allocas"   
)

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 990 of file StackSafetyAnalysis.cpp.

◆ false

false

Definition at line 982 of file StackSafetyAnalysis.cpp.

◆ GlobalPassName

GlobalPassName = "Stack Safety Analysis"
static

Definition at line 985 of file StackSafetyAnalysis.cpp.

◆ LocalPassArg

LocalPassArg = "stack-safety-local"
static

Definition at line 977 of file StackSafetyAnalysis.cpp.

◆ LocalPassName

LocalPassName = "Stack Safety Local Analysis"
static

Definition at line 978 of file StackSafetyAnalysis.cpp.

◆ StackSafetyMaxIterations

cl::opt<int> StackSafetyMaxIterations("stack-safety-max-iterations", cl::init(20), cl::Hidden)
static

◆ StackSafetyPrint

cl::opt<bool> StackSafetyPrint("stack-safety-print", cl::init(false), cl::Hidden)
static

◆ StackSafetyRun

cl::opt<bool> StackSafetyRun("stack-safety-run", cl::init(false), cl::Hidden)
static