aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp3
-rw-r--r--lib/Transforms/IPO/Internalize.cpp6
-rw-r--r--lib/Transforms/IPO/OldPoolAllocate.cpp5
3 files changed, 8 insertions, 6 deletions
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp
index c419ad1..494b363 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/lib/Transforms/IPO/GlobalDCE.cpp
@@ -70,8 +70,6 @@ static bool RemoveUnreachableGlobalVariables(Module &M) {
namespace {
struct GlobalDCE : public Pass {
- const char *getPassName() const { return "Dead Global Elimination"; }
-
// run - Do the GlobalDCE pass on the specified module, optionally updating
// the specified callgraph to reflect the changes.
//
@@ -88,6 +86,7 @@ namespace {
AU.addRequired(CallGraph::ID);
}
};
+ RegisterPass<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 ff0b790..6be64fc 100644
--- a/lib/Transforms/IPO/Internalize.cpp
+++ b/lib/Transforms/IPO/Internalize.cpp
@@ -14,9 +14,8 @@
static Statistic<> NumChanged("internalize\t- Number of functions internal'd");
+namespace {
class InternalizePass : public Pass {
- const char *getPassName() const { return "Internalize Functions"; }
-
virtual bool run(Module &M) {
bool FoundMain = false; // Look for a function named main...
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
@@ -42,6 +41,9 @@ class InternalizePass : public Pass {
}
};
+RegisterPass<InternalizePass> X("internalize", "Internalize Functions");
+} // end anonymous namespace
+
Pass *createInternalizePass() {
return new InternalizePass();
}
diff --git a/lib/Transforms/IPO/OldPoolAllocate.cpp b/lib/Transforms/IPO/OldPoolAllocate.cpp
index eb463b8..dca8b97 100644
--- a/lib/Transforms/IPO/OldPoolAllocate.cpp
+++ b/lib/Transforms/IPO/OldPoolAllocate.cpp
@@ -207,8 +207,6 @@ namespace {
// Define the pass class that we implement...
struct PoolAllocate : public Pass {
- const char *getPassName() const { return "Pool Allocate"; }
-
PoolAllocate() {
switch (ReqPointerSize) {
case Ptr32bits: POINTERTYPE = Type::UIntTy; break;
@@ -316,6 +314,9 @@ namespace {
map<DSNode*, PoolInfo> &PoolDescs);
};
+
+ RegisterPass<PoolAllocate> X("poolalloc",
+ "Pool allocate disjoint datastructures");
}
// isNotPoolableAlloc - This is a predicate that returns true if the specified