LLVM  3.7.0
Classes | Namespaces | Macros | Functions
PassSupport.h File Reference
#include "Pass.h"
#include "llvm/InitializePasses.h"
#include "llvm/PassInfo.h"
#include "llvm/PassRegistry.h"
#include "llvm/Support/Atomic.h"
#include "llvm/Support/Valgrind.h"
#include <vector>
Include dependency graph for PassSupport.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  llvm::RegisterPass< passName >
 RegisterPass<t> template - This template class is used to notify the system that a Pass is available for use, and registers it into the internal database maintained by the PassManager. More...
 
class  llvm::RegisterAGBase
 RegisterAnalysisGroup - Register a Pass as a member of an analysis group. More...
 
struct  llvm::RegisterAnalysisGroup< Interface, Default >
 
struct  llvm::PassRegistrationListener
 PassRegistrationListener class - This class is meant to be derived from by clients that are interested in which passes get registered and unregistered at runtime (which can be because of the RegisterPass constructors being run as the program starts up, or may be because a shared object just got loaded). More...
 

Namespaces

 llvm
 Compute iterated dominance frontiers using a linear time algorithm.
 

Macros

#define CALL_ONCE_INITIALIZATION(function)
 
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
 
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)   static void* initialize##passName##PassOnce(PassRegistry &Registry) {
 
#define INITIALIZE_PASS_DEPENDENCY(depName)   initialize##depName##Pass(Registry);
 
#define INITIALIZE_AG_DEPENDENCY(depName)   initialize##depName##AnalysisGroup(Registry);
 
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
 
#define INITIALIZE_PASS_WITH_OPTIONS(PassName, Arg, Name, Cfg, Analysis)
 
#define INITIALIZE_PASS_WITH_OPTIONS_BEGIN(PassName, Arg, Name, Cfg, Analysis)
 
#define INITIALIZE_ANALYSIS_GROUP(agName, name, defaultPass)
 
#define INITIALIZE_AG_PASS(passName, agName, arg, name, cfg, analysis, def)
 
#define INITIALIZE_AG_PASS_BEGIN(passName, agName, arg, n, cfg, analysis, def)
 
#define INITIALIZE_AG_PASS_END(passName, agName, arg, n, cfg, analysis, def)
 

Functions

template<typename PassName >
Passllvm::callDefaultCtor ()
 
template<typename PassName >
Passllvm::callTargetMachineCtor (TargetMachine *TM)
 

Macro Definition Documentation

#define CALL_ONCE_INITIALIZATION (   function)
Value:
static volatile sys::cas_flag initialized = 0; \
sys::cas_flag old_val = sys::CompareAndSwap(&initialized, 1, 0); \
if (old_val == 0) { \
function(Registry); \
TsanHappensBefore(&initialized); \
initialized = 2; \
} else { \
sys::cas_flag tmp = initialized; \
while (tmp != 2) { \
tmp = initialized; \
} \
} \
TsanHappensAfter(&initialized);
#define TsanHappensAfter(cv)
Definition: Valgrind.h:54
#define TsanHappensBefore(cv)
Definition: Valgrind.h:50
cas_flag CompareAndSwap(volatile cas_flag *ptr, cas_flag new_value, cas_flag old_value)
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
void MemoryFence()
Definition: Atomic.cpp:29
#define TsanIgnoreWritesEnd()
Definition: Valgrind.h:62
#define TsanIgnoreWritesBegin()
Definition: Valgrind.h:58
uint32_t cas_flag
Definition: Atomic.h:26
print Print MemDeps of function

Definition at line 36 of file PassSupport.h.

Referenced by llvm::initializeHexagonCFGOptimizerPass(), llvm::initializeHexagonDAGToDAGISelPass(), llvm::initializeHexagonExpandCondsetsPass(), llvm::initializeHexagonExpandPredSpillCodePass(), and llvm::initializePPCDAGToDAGISelPass().

#define INITIALIZE_AG_DEPENDENCY (   depName)    initialize##depName##AnalysisGroup(Registry);

Definition at line 72 of file PassSupport.h.

#define INITIALIZE_AG_PASS (   passName,
  agName,
  arg,
  name,
  cfg,
  analysis,
  def 
)
Value:
static void* initialize##passName##PassOnce(PassRegistry &Registry) { \
if (!def) initialize##agName##AnalysisGroup(Registry); \
PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
Registry.registerPass(*PI, true); \
\
PassInfo *AI = new PassInfo(name, & agName :: ID); \
Registry.registerAnalysisGroup(& agName ::ID, & passName ::ID, \
*AI, def, true); \
return AI; \
} \
void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
CALL_ONCE_INITIALIZATION(initialize##passName##PassOnce) \
}
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, const char *const *StandardNames)
initialize - Initialize the set of available library functions based on the specified target triple...

Definition at line 184 of file PassSupport.h.

#define INITIALIZE_AG_PASS_BEGIN (   passName,
  agName,
  arg,
  n,
  cfg,
  analysis,
  def 
)
Value:
static void* initialize##passName##PassOnce(PassRegistry &Registry) { \
if (!def) initialize##agName##AnalysisGroup(Registry);
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, const char *const *StandardNames)
initialize - Initialize the set of available library functions based on the specified target triple...

Definition at line 201 of file PassSupport.h.

#define INITIALIZE_AG_PASS_END (   passName,
  agName,
  arg,
  n,
  cfg,
  analysis,
  def 
)
Value:
PassInfo *PI = new PassInfo(n, arg, & passName ::ID, \
PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
Registry.registerPass(*PI, true); \
\
PassInfo *AI = new PassInfo(n, & agName :: ID); \
Registry.registerAnalysisGroup(& agName ::ID, & passName ::ID, \
*AI, def, true); \
return AI; \
} \
void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
CALL_ONCE_INITIALIZATION(initialize##passName##PassOnce) \
}
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, const char *const *StandardNames)
initialize - Initialize the set of available library functions based on the specified target triple...
aarch64 type AArch64 Type Promotion Pass
#define CALL_ONCE_INITIALIZATION(function)
Definition: PassSupport.h:36

Definition at line 205 of file PassSupport.h.

#define INITIALIZE_ANALYSIS_GROUP (   agName,
  name,
  defaultPass 
)
Value:
static void* initialize##agName##AnalysisGroupOnce(PassRegistry &Registry) { \
initialize##defaultPass##Pass(Registry); \
PassInfo *AI = new PassInfo(name, & agName :: ID); \
Registry.registerAnalysisGroup(& agName ::ID, 0, *AI, false, true); \
return AI; \
} \
void llvm::initialize##agName##AnalysisGroup(PassRegistry &Registry) { \
CALL_ONCE_INITIALIZATION(initialize##agName##AnalysisGroupOnce) \
}
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, const char *const *StandardNames)
initialize - Initialize the set of available library functions based on the specified target triple...
aarch64 type AArch64 Type Promotion Pass
#define CALL_ONCE_INITIALIZATION(function)
Definition: PassSupport.h:36
static const char * name

Definition at line 172 of file PassSupport.h.

#define INITIALIZE_PASS (   passName,
  arg,
  name,
  cfg,
  analysis 
)
Value:
static void* initialize##passName##PassOnce(PassRegistry &Registry) { \
PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
Registry.registerPass(*PI, true); \
return PI; \
} \
void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
CALL_ONCE_INITIALIZATION(initialize##passName##PassOnce) \
}
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, const char *const *StandardNames)
initialize - Initialize the set of available library functions based on the specified target triple...
aarch64 type AArch64 Type Promotion Pass
#define CALL_ONCE_INITIALIZATION(function)
Definition: PassSupport.h:36
static const char * name

Definition at line 56 of file PassSupport.h.

#define INITIALIZE_PASS_BEGIN (   passName,
  arg,
  name,
  cfg,
  analysis 
)    static void* initialize##passName##PassOnce(PassRegistry &Registry) {

Definition at line 67 of file PassSupport.h.

#define INITIALIZE_PASS_DEPENDENCY (   depName)    initialize##depName##Pass(Registry);

Definition at line 70 of file PassSupport.h.

#define INITIALIZE_PASS_END (   passName,
  arg,
  name,
  cfg,
  analysis 
)
Value:
PassInfo *PI = new PassInfo(name, arg, & passName ::ID, \
PassInfo::NormalCtor_t(callDefaultCtor< passName >), cfg, analysis); \
Registry.registerPass(*PI, true); \
return PI; \
} \
void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
CALL_ONCE_INITIALIZATION(initialize##passName##PassOnce) \
}
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, const char *const *StandardNames)
initialize - Initialize the set of available library functions based on the specified target triple...
aarch64 type AArch64 Type Promotion Pass
#define CALL_ONCE_INITIALIZATION(function)
Definition: PassSupport.h:36
static const char * name

Definition at line 75 of file PassSupport.h.

#define INITIALIZE_PASS_WITH_OPTIONS (   PassName,
  Arg,
  Name,
  Cfg,
  Analysis 
)
Value:
INITIALIZE_PASS_BEGIN(PassName, Arg, Name, Cfg, Analysis) \
PassName::registerOptions(); \
INITIALIZE_PASS_END(PassName, Arg, Name, Cfg, Analysis)
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:75
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:67
block Block Frequency Analysis

Definition at line 85 of file PassSupport.h.

#define INITIALIZE_PASS_WITH_OPTIONS_BEGIN (   PassName,
  Arg,
  Name,
  Cfg,
  Analysis 
)
Value:
INITIALIZE_PASS_BEGIN(PassName, Arg, Name, Cfg, Analysis) \
PassName::registerOptions(); \
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:67
block Block Frequency Analysis

Definition at line 90 of file PassSupport.h.