* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Add support for different "PassType's"
* Add new RegisterOpt/RegisterAnalysis templates for registering passes that
are to show up in opt or analyze
* Register Analyses now
* Change optimizations to use RegisterOpt instead of RegisterPass
* Remove getPassName implementations from various subclasses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3112 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp
index 905c7a5..b979104 100644
--- a/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/lib/Transforms/IPO/ConstantMerge.cpp
@@ -31,8 +31,8 @@
}
};
-Statistic<> NumMerged("constmerge\t\t- Number of global constants merged");
-RegisterPass<ConstantMerge> X("constmerge", "Merge Duplicate Global Constants");
+ Statistic<> NumMerged("constmerge\t\t- Number of global constants merged");
+ RegisterOpt<ConstantMerge> X("constmerge","Merge Duplicate Global Constants");
}
Pass *createConstantMergePass() { return new ConstantMerge(); }
diff --git a/lib/Transforms/IPO/DeadTypeElimination.cpp b/lib/Transforms/IPO/DeadTypeElimination.cpp
index f276ca7..3473f52 100644
--- a/lib/Transforms/IPO/DeadTypeElimination.cpp
+++ b/lib/Transforms/IPO/DeadTypeElimination.cpp
@@ -30,7 +30,7 @@
AU.addRequired(FindUsedTypes::ID);
}
};
- RegisterPass<DTE> X("deadtypeelim", "Dead Type Elimination");
+ RegisterOpt<DTE> X("deadtypeelim", "Dead Type Elimination");
Statistic<> NumKilled("deadtypeelim\t- Number of unused typenames removed from symtab");
}
diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp
index 0d05611..44f8485 100644
--- a/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/lib/Transforms/IPO/FunctionResolution.cpp
@@ -32,7 +32,7 @@
struct FunctionResolvingPass : public Pass {
bool run(Module &M);
};
- RegisterPass<FunctionResolvingPass> X("funcresolve", "Resolve Functions");
+ RegisterOpt<FunctionResolvingPass> X("funcresolve", "Resolve Functions");
}
Pass *createFunctionResolvingPass() {
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp
index a61b1ab..029456e 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/lib/Transforms/IPO/GlobalDCE.cpp
@@ -86,7 +86,7 @@
AU.addRequired(CallGraph::ID);
}
};
- RegisterPass<GlobalDCE> X("globaldce", "Dead Global Elimination");
+ RegisterOpt<GlobalDCE> X("globaldce", "Dead Global Elimination");
}
Pass *createGlobalDCEPass() { return new GlobalDCE(); }
diff --git a/lib/Transforms/IPO/Internalize.cpp b/lib/Transforms/IPO/Internalize.cpp
index b6a48b4..7ea7a6f 100644
--- a/lib/Transforms/IPO/Internalize.cpp
+++ b/lib/Transforms/IPO/Internalize.cpp
@@ -41,7 +41,7 @@
}
};
-RegisterPass<InternalizePass> X("internalize", "Internalize Functions");
+ RegisterOpt<InternalizePass> X("internalize", "Internalize Functions");
} // end anonymous namespace
Pass *createInternalizePass() {
diff --git a/lib/Transforms/IPO/OldPoolAllocate.cpp b/lib/Transforms/IPO/OldPoolAllocate.cpp
index c22d53e..43fd162 100644
--- a/lib/Transforms/IPO/OldPoolAllocate.cpp
+++ b/lib/Transforms/IPO/OldPoolAllocate.cpp
@@ -315,8 +315,8 @@
};
- RegisterPass<PoolAllocate> X("poolalloc",
- "Pool allocate disjoint datastructures");
+ RegisterOpt<PoolAllocate> X("poolalloc",
+ "Pool allocate disjoint datastructures");
}
// isNotPoolableAlloc - This is a predicate that returns true if the specified
diff --git a/lib/Transforms/IPO/SimpleStructMutation.cpp b/lib/Transforms/IPO/SimpleStructMutation.cpp
index 464d628..5987155 100644
--- a/lib/Transforms/IPO/SimpleStructMutation.cpp
+++ b/lib/Transforms/IPO/SimpleStructMutation.cpp
@@ -189,10 +189,10 @@
}
namespace {
- RegisterPass<SwapStructElements> X("swapstructs",
- "Swap structure types around",
- createSwapElementsPass);
- RegisterPass<SortStructElements> Y("sortstructs",
- "Sort structure elements by size",
- createSortElementsPass);
+ RegisterOpt<SwapStructElements> X("swapstructs",
+ "Swap structure types around",
+ createSwapElementsPass);
+ RegisterOpt<SortStructElements> Y("sortstructs",
+ "Sort structure elements by size",
+ createSortElementsPass);
}
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
index 95cd5be..98430f9 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
@@ -47,7 +47,7 @@
}
};
-static RegisterPass<ProfilePaths> X("paths", "Profile Paths");
+static RegisterOpt<ProfilePaths> X("paths", "Profile Paths");
// createProfilePathsPass - Create a new pass to add path profiling
//
diff --git a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
index ef7d63e..d3e20ac 100644
--- a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
+++ b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
@@ -17,7 +17,7 @@
AnalysisID UnifyFunctionExitNodes::ID(AnalysisID::create<UnifyFunctionExitNodes>());
-static RegisterPass<UnifyFunctionExitNodes>
+static RegisterOpt<UnifyFunctionExitNodes>
X("mergereturn", "Unify function exit nodes");
// UnifyAllExitNodes - Unify all exit nodes of the CFG by creating a new