25 #ifndef _JIT_COMPILER2_PASSMANAGER
26 #define _JIT_COMPILER2_PASSMANAGER
37 #define MYLOG(EXPR) do { dbg() << EXPR; } while(0)
53 typedef Pass* (*ConstructorTy)();
109 template<
class _PassClass>
119 assert(PI &&
"Pass not registered");
123 MYLOG(
"PassManager::PassManager()" <<
nl);
154 template<
class _PassClass>
171 template<
class _PassClass>
174 template <
class _PassClass>
void finalizePasses()
run pass finalizers
Pass superclass All compiler passes should inheritate this class.
alloc::unordered_map< PassInfo::IDTy, bool >::type ResultReadyMapTy
alloc::unordered_set< PassInfo::IDTy >::type PassListTy
alloc::unordered_map< PassInfo::IDTy, PassInfo * >::type PassInfoMapTy
PassInfo(const char *name, PassInfo::IDTy ID, ConstructorTy ctor)
PassMapTy initialized_passes
This stores the initialized passes.
Pass *(* ConstructorTy)()
_Base::const_iterator const_iterator
JNIEnv jclass jobject const char * name
PassInfoMapTy::const_iterator registered_begin() const
Pass * get_initialized_Pass(PassInfo::IDTy ID)
PassMapTy::const_iterator initialized_end() const
void initializePasses()
run pass initializers
std::vector< T, Allocator< T > > type
static PassInfoMapTy & registered_passes()
PassInfoMapTy::const_iterator registered_end() const
Pass * create_Pass() const
PassRegistry(const char *name)
Manage the execution of compiler passes.
alloc::vector< PassInfo::IDTy >::type ScheduleListTy
const char * get_Pass_name(PassInfo::IDTy ID)
void add_Pass()
add a compiler pass
static void register_Pass(PassInfo *PI)
DO NOT CALL THIS MANUALLY.
PassMapTy::const_iterator initialized_begin() const
void runPasses(JITData &JD)
run passes
const char * get_name() const
#define assert_msg(COND, EXPR)
ConstructorTy ctor
Constructor function pointer.
_PassClass * get_Pass_result()
ResultReadyMapTy result_ready
Map of ready results.
PassListTy passes
The list of passed that should be performed.
alloc::unordered_map< PassInfo::IDTy, Pass * >::type PassMapTy
ScheduleListTy schedule
This variable contains a schedule of the passes.