Analysis groups need to initialize their default implementations.
authorOwen Anderson <resistor@mac.com>
Wed, 13 Oct 2010 21:49:58 +0000 (21:49 +0000)
committerOwen Anderson <resistor@mac.com>
Wed, 13 Oct 2010 21:49:58 +0000 (21:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116441 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/PassSupport.h
lib/Analysis/AliasAnalysis.cpp
lib/Analysis/IPA/CallGraph.cpp
lib/Analysis/ProfileInfo.cpp
lib/CodeGen/RegisterCoalescer.cpp

index ecccf791fe0cdaada1d61fe38294fb6f52b29c9b..d9dc64a5b56f1b9131aa2531eda9fda8a496f6f2 100644 (file)
@@ -236,8 +236,9 @@ struct RegisterAnalysisGroup : public RegisterAGBase {
   }
 };
 
-#define INITIALIZE_ANALYSIS_GROUP(agName, name) \
+#define INITIALIZE_ANALYSIS_GROUP(agName, name, defaultPass) \
   static void* initialize##agName##AnalysisGroupOnce(PassRegistry &Registry) { \
+    initialize##defaultPass##Pass(Registry); \
     PassInfo *AI = new PassInfo(name, & agName :: ID); \
     Registry.registerAnalysisGroup(& agName ::ID, 0, *AI, false); \
     return AI; \
index c189a1d61beb4ca6b70887ac75982b332626d9ae..56fbfe446a32f1e69ed5c207af124606eeee5085 100644 (file)
@@ -36,7 +36,7 @@
 using namespace llvm;
 
 // Register the AliasAnalysis interface, providing a nice name to refer to.
-INITIALIZE_ANALYSIS_GROUP(AliasAnalysis, "Alias Analysis")
+INITIALIZE_ANALYSIS_GROUP(AliasAnalysis, "Alias Analysis", BasicAliasAnalysis)
 char AliasAnalysis::ID = 0;
 
 //===----------------------------------------------------------------------===//
index a555222799179357b7ed3e42bc457e56d5ae18ec..223464988ce20b660db44efcf2cf50732bb79456 100644 (file)
@@ -171,7 +171,7 @@ private:
 
 } //End anonymous namespace
 
-INITIALIZE_ANALYSIS_GROUP(CallGraph, "Call Graph")
+INITIALIZE_ANALYSIS_GROUP(CallGraph, "Call Graph", BasicCallGraph)
 INITIALIZE_AG_PASS(BasicCallGraph, CallGraph, "basiccg",
                    "Basic CallGraph Construction", false, true, true)
 
index 29d933e547ba3387caa825529f0e20873627c925..e8e774a76338c595636a0c2d20b3d3422720f993 100644 (file)
@@ -29,7 +29,7 @@ namespace llvm {
 }
 
 // Register the ProfileInfo interface, providing a nice name to refer to.
-INITIALIZE_ANALYSIS_GROUP(ProfileInfo, "Profile Information")
+INITIALIZE_ANALYSIS_GROUP(ProfileInfo, "Profile Information", NoProfileInfo)
 
 namespace llvm {
 
index 657134a9ab757fe4c52d9d10a4b5d0ceb2d00b21..407559a211a0a7de65521795985d0856b0312e33 100644 (file)
@@ -24,7 +24,8 @@
 using namespace llvm;
 
 // Register the RegisterCoalescer interface, providing a nice name to refer to.
-INITIALIZE_ANALYSIS_GROUP(RegisterCoalescer, "Register Coalescer")
+INITIALIZE_ANALYSIS_GROUP(RegisterCoalescer, "Register Coalescer", 
+                          SimpleRegisterCoalescing)
 char RegisterCoalescer::ID = 0;
 
 // RegisterCoalescer destructor: DO NOT move this to the header file