13 #ifndef LLVM_PASSINFO_H
14 #define LLVM_PASSINFO_H
34 typedef Pass* (*NormalCtor_t)();
41 const bool IsCFGOnlyPass;
42 const bool IsAnalysis;
43 const bool IsAnalysisGroup;
44 std::vector<const PassInfo *> ItfImpl;
53 bool isCFGOnly,
bool is_analysis,
55 : PassName(name), PassArgument(arg), PassID(pi), IsCFGOnlyPass(isCFGOnly),
56 IsAnalysis(is_analysis), IsAnalysisGroup(
false), NormalCtor(normal),
57 TargetMachineCtor(machine) {}
62 : PassName(name), PassArgument(
""), PassID(pi), IsCFGOnlyPass(
false),
63 IsAnalysis(
false), IsAnalysisGroup(
true), NormalCtor(nullptr),
64 TargetMachineCtor(nullptr) {}
81 bool isPassID(
const void *IDPtr)
const {
return PassID == IDPtr; }
111 TargetMachineCtor = Ctor;
117 "No default implementation found for analysis group!");
119 "Cannot call createPass on PassInfo without default ctor!");
128 ItfImpl.push_back(ItfPI);
139 void operator=(
const PassInfo &) =
delete;
Pass interface - Implemented by all 'passes'.
void setNormalCtor(NormalCtor_t Ctor)
TargetMachineCtor_t getTargetMachineCtor() const
getTargetMachineCtor - Return a pointer to a function, that when called with a TargetMachine, creates an instance of the pass and returns it.
const std::vector< const PassInfo * > & getInterfacesImplemented() const
getInterfacesImplemented - Return a list of all of the analysis group interfaces implemented by this ...
aarch64 AArch64 CCMP Pass
bool isCFGOnlyPass() const
isCFGOnlyPass - return true if this pass only looks at the CFG for the function.
const void * getTypeInfo() const
getTypeInfo - Return the id object for the pass...
Pass * createPass() const
createPass() - Use this method to create an instance of this pass.
PassInfo(StringRef name, StringRef arg, const void *pi, NormalCtor_t normal, bool isCFGOnly, bool is_analysis, TargetMachineCtor_t machine=nullptr)
PassInfo ctor - Do not call this directly, this should only be invoked through RegisterPass.
void addInterfaceImplemented(const PassInfo *ItfPI)
addInterfaceImplemented - This method is called when this pass is registered as a member of an analys...
bool isAnalysisGroup() const
isAnalysisGroup - Return true if this is an analysis group, not a normal pass.
bool isPassID(const void *IDPtr) const
Return true if this PassID implements the specified ID pointer.
StringRef getPassArgument() const
getPassArgument - Return the command line option that may be passed to 'opt' that will cause this pas...
void setTargetMachineCtor(TargetMachineCtor_t Ctor)
Function Alias Analysis false
NormalCtor_t getNormalCtor() const
getNormalCtor - Return a pointer to a function, that when called, creates an instance of the pass and...
PassInfo class - An instance of this class exists for every pass known by the system, and can be obtained from a live Pass by calling its getPassInfo() method.
Pass *(* TargetMachineCtor_t)(TargetMachine *)
StringRef getPassName() const
getPassName - Return the friendly name for the pass, never returns null
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
PassInfo(StringRef name, const void *pi)
PassInfo ctor - Do not call this directly, this should only be invoked through RegisterPass.
Primary interface to the complete machine description for the target machine.
StringRef - Represent a constant reference to a string, i.e.