LLVM  14.0.0git
Classes | Namespaces | Macros | Functions
PassSupport.h File Reference
#include "llvm/ADT/StringRef.h"
#include "llvm/PassInfo.h"
#include "llvm/PassRegistry.h"
#include "llvm/Support/Threading.h"
#include <functional>
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
 ---------------------— PointerInfo ------------------------------------—
 

Macros

#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 ()
 

Macro Definition Documentation

◆ INITIALIZE_AG_DEPENDENCY

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

Definition at line 55 of file PassSupport.h.

◆ INITIALIZE_AG_PASS

#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; \
} \
static llvm::once_flag Initialize##passName##PassFlag; \
void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
llvm::call_once(Initialize##passName##PassFlag, \
initialize##passName##PassOnce, std::ref(Registry)); \
}

Definition at line 153 of file PassSupport.h.

◆ INITIALIZE_AG_PASS_BEGIN

#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);

Definition at line 173 of file PassSupport.h.

◆ INITIALIZE_AG_PASS_END

#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; \
} \
static llvm::once_flag Initialize##passName##PassFlag; \
void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
llvm::call_once(Initialize##passName##PassFlag, \
initialize##passName##PassOnce, std::ref(Registry)); \
}

Definition at line 178 of file PassSupport.h.

◆ INITIALIZE_ANALYSIS_GROUP

#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; \
} \
static llvm::once_flag Initialize##agName##AnalysisGroupFlag; \
void llvm::initialize##agName##AnalysisGroup(PassRegistry &Registry) { \
llvm::call_once(Initialize##agName##AnalysisGroupFlag, \
initialize##agName##AnalysisGroupOnce, \
std::ref(Registry)); \
}

Definition at line 139 of file PassSupport.h.

◆ INITIALIZE_PASS

#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; \
} \
static llvm::once_flag Initialize##passName##PassFlag; \
void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
llvm::call_once(Initialize##passName##PassFlag, \
initialize##passName##PassOnce, std::ref(Registry)); \
}

Definition at line 37 of file PassSupport.h.

◆ INITIALIZE_PASS_BEGIN

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

Definition at line 51 of file PassSupport.h.

◆ INITIALIZE_PASS_DEPENDENCY

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

Definition at line 54 of file PassSupport.h.

◆ INITIALIZE_PASS_END

#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; \
} \
static llvm::once_flag Initialize##passName##PassFlag; \
void llvm::initialize##passName##Pass(PassRegistry &Registry) { \
llvm::call_once(Initialize##passName##PassFlag, \
initialize##passName##PassOnce, std::ref(Registry)); \
}

Definition at line 58 of file PassSupport.h.

◆ INITIALIZE_PASS_WITH_OPTIONS

#define INITIALIZE_PASS_WITH_OPTIONS (   PassName,
  Arg,
  Name,
  Cfg,
  Analysis 
)
Value:
PassName::registerOptions(); \
INITIALIZE_PASS_END(PassName, Arg, Name, Cfg, Analysis)

Definition at line 71 of file PassSupport.h.

◆ INITIALIZE_PASS_WITH_OPTIONS_BEGIN

#define INITIALIZE_PASS_WITH_OPTIONS_BEGIN (   PassName,
  Arg,
  Name,
  Cfg,
  Analysis 
)
Value:
PassName::registerOptions();

Definition at line 76 of file PassSupport.h.

Pass
print lazy value Lazy Value Info Printer Pass
Definition: LazyValueInfo.cpp:1966
Analysis
block Block Frequency Analysis
Definition: BlockFrequencyInfo.cpp:302
initialize
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef< StringLiteral > StandardNames)
Initialize the set of available library functions based on the specified target triple.
Definition: TargetLibraryInfo.cpp:116
Arg
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
Definition: AMDGPULibCalls.cpp:206
analysis
demanded Demanded bits analysis
Definition: DemandedBits.cpp:64
llvm::once_flag
std::once_flag once_flag
Definition: Threading.h:60
name
static const char * name
Definition: SVEIntrinsicOpts.cpp:78
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:52
llvm::call_once
void call_once(once_flag &flag, Function &&F, Args &&... ArgList)
Execute the function specified as a parameter once.
Definition: Threading.h:90
INITIALIZE_PASS_BEGIN
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
Definition: PassSupport.h:51
n
The same transformation can work with an even modulo with the addition of a and shrink the compare RHS by the same amount Unless the target supports that transformation probably isn t worthwhile The transformation can also easily be made to work with non zero equality for n
Definition: README.txt:685
PassName
static const char PassName[]
Definition: X86LowerAMXIntrinsics.cpp:669
llvm::Intrinsic::ID
unsigned ID
Definition: TargetTransformInfo.h:37