- // PassInfo ctor - Do not call this directly, this should only be invoked
- // through RegisterPass.
- PassInfo(const char *name, const char *arg, const std::type_info &ti,
- unsigned pt, Pass *(*normal)(), Pass *(*data)(const TargetData &))
- : PassName(name), PassArgument(arg), TypeInfo(ti), PassType(pt),
- NormalCtor(normal), DataCtor(data) {
+private:
+ const char *const PassName; // Nice name for Pass
+ const char *const PassArgument; // Command Line argument to run this pass
+ const intptr_t PassID;
+ const bool IsCFGOnlyPass; // Pass only looks at the CFG.
+ const bool IsAnalysis; // True if an analysis pass.
+ const bool IsAnalysisGroup; // True if an analysis group.
+ const InterfaceInfo *ItfImpl;// Interfaces implemented by this pass
+
+ NormalCtor_t NormalCtor;
+
+public:
+ /// PassInfo ctor - Do not call this directly, this should only be invoked
+ /// through RegisterPass.
+ PassInfo(const char *name, const char *arg, intptr_t pi,
+ NormalCtor_t normal = 0,
+ bool isCFGOnly = false, bool is_analysis = false)
+ : PassName(name), PassArgument(arg), PassID(pi),
+ IsCFGOnlyPass(isCFGOnly),
+ IsAnalysis(is_analysis), IsAnalysisGroup(false), NormalCtor(normal) {
+ registerPass();
+ }
+ /// PassInfo ctor - Do not call this directly, this should only be invoked
+ /// through RegisterPass. This version is for use by analysis groups; it
+ /// does not auto-register the pass.
+ PassInfo(const char *name, intptr_t pi)
+ : PassName(name), PassArgument(""), PassID(pi),
+ IsCFGOnlyPass(false),
+ IsAnalysis(false), IsAnalysisGroup(true), NormalCtor(0) {