LLVM API Documentation
#include <PassSupport.h>
Inheritance diagram for llvm::RegisterPassBase:
Public Member Functions | |
const PassInfo * | getPassInfo () const |
RegisterPassBase (const char *Name, const char *Arg, const std::type_info &TI, unsigned char PT, Pass *(*Normal)()=0, Pass *(*TargetCtor)(TargetMachine &)=0) | |
RegisterPassBase (const std::type_info &TI, unsigned char PT) | |
~RegisterPassBase () | |
Protected Member Functions | |
void | registerPass () |
void | unregisterPass () |
void | setOnlyUsesCFG () |
Protected Attributes | |
PassInfo | PIObj |
static RegisterPass<YourPassClassName> tmp("passopt", "My Pass Name");
This statement will cause your pass to be created by calling the default constructor exposed by the pass. If you have a different constructor that must be called, create a global constructor function (which takes the arguments you need and returns a Pass*) and register your pass like this:
Pass *createMyPass(foo &opt) { return new MyPass(opt); } static RegisterPass<PassClassName> tmp("passopt", "My Name", createMyPass);
Definition at line 149 of file PassSupport.h.
llvm::RegisterPassBase::RegisterPassBase | ( | const char * | Name, | |
const char * | Arg, | |||
const std::type_info & | TI, | |||
unsigned char | PT, | |||
Pass *(*)() | Normal = 0 , |
|||
Pass *(*)(TargetMachine &) | TargetCtor = 0 | |||
) | [inline] |
llvm::RegisterPassBase::RegisterPassBase | ( | const std::type_info & | TI, | |
unsigned char | PT | |||
) | [inline] |
llvm::RegisterPassBase::~RegisterPassBase | ( | ) | [inline] |
Definition at line 167 of file PassSupport.h.
References llvm::PassInfo::AnalysisGroup, llvm::PassInfo::getPassType(), PIObj, and unregisterPass().
const PassInfo* llvm::RegisterPassBase::getPassInfo | ( | ) | const [inline] |
getPassInfo - Get the pass info for the registered class...
Definition at line 152 of file PassSupport.h.
References PIObj.
void RegisterPassBase::registerPass | ( | ) | [protected] |
Definition at line 335 of file Pass.cpp.
References E, llvm::PassInfo::getTypeInfo(), I, and PIObj.
Referenced by llvm::RegisterAGBase::RegisterAGBase(), and RegisterPassBase().
void RegisterPassBase::setOnlyUsesCFG | ( | ) | [protected] |
setOnlyUsesCFG - Notice that this pass only depends on the CFG, so transformations that do not modify the CFG do not invalidate this pass.
Definition at line 40 of file Pass.cpp.
References getCFGOnlyAnalyses(), and PIObj.
Referenced by llvm::RegisterAnalysis< PassName >::RegisterAnalysis(), and llvm::RegisterOpt< PassName >::RegisterOpt().
void RegisterPassBase::unregisterPass | ( | ) | [protected] |
Definition at line 350 of file Pass.cpp.
References E, llvm::PassInfo::getTypeInfo(), I, and PIObj.
Referenced by llvm::RegisterAGBase::~RegisterAGBase(), and ~RegisterPassBase().
PassInfo llvm::RegisterPassBase::PIObj [protected] |
Definition at line 174 of file PassSupport.h.
Referenced by getPassInfo(), llvm::RegisterAGBase::RegisterAGBase(), registerPass(), setOnlyUsesCFG(), unregisterPass(), llvm::RegisterAGBase::~RegisterAGBase(), and ~RegisterPassBase().