sys::MemoryFence(); \
} \
} \
- } \
- static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis);
+ }
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis) \
static void* initialize##passName##PassOnce(PassRegistry &Registry) {
sys::MemoryFence(); \
} \
} \
- } \
- static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis);
+ }
template<typename PassName>
Pass *callDefaultCtor() { return new PassName(); }
sys::MemoryFence(); \
} \
} \
- } \
- static RegisterAnalysisGroup<agName> agName##_info (name);
+ }
#define INITIALIZE_AG_PASS(passName, agName, arg, name, cfg, analysis, def) \
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); \
sys::MemoryFence(); \
} \
} \
- } \
- static RegisterPass<passName> passName ## _info(arg, name, cfg, analysis); \
- static RegisterAnalysisGroup<agName, def> passName ## _ag(passName ## _info);
+ }
#define INITIALIZE_AG_PASS_BEGIN(passName, agName, arg, n, cfg, analysis, def) \
- static void* initialize##passName##PassOnce(PassRegistry &Registry) {
+ static void* initialize##passName##PassOnce(PassRegistry &Registry) { \
+ if (!def) initialize##agName##AnalysisGroup(Registry);
#define INITIALIZE_AG_PASS_END(passName, agName, arg, n, cfg, analysis, def) \
PassInfo *PI = new PassInfo(n, arg, & passName ::ID, \
sys::MemoryFence(); \
} \
} \
- } \
- static RegisterPass<passName> passName ## _info(arg, n, cfg, analysis); \
- static RegisterAnalysisGroup<agName, def> passName ## _ag(passName ## _info);
+ }
//===---------------------------------------------------------------------------
/// PassRegistrationListener class - This class is meant to be derived from by