aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-26 21:12:44 +0000
committerChris Lattner <sabre@nondot.org>2002-07-26 21:12:44 +0000
commit1e43516dcf4aa152432447397334cd43744d63e1 (patch)
tree0287d82e3bb70e8f2140d9dc67de7d8cabf1d908 /lib/Transforms
parent5d549083e2dc55cc1aa035f1069480d052717061 (diff)
downloadexternal_llvm-1e43516dcf4aa152432447397334cd43744d63e1.tar.gz
external_llvm-1e43516dcf4aa152432447397334cd43744d63e1.tar.bz2
external_llvm-1e43516dcf4aa152432447397334cd43744d63e1.zip
* 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
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/ConstantMerge.cpp4
-rw-r--r--lib/Transforms/IPO/DeadTypeElimination.cpp2
-rw-r--r--lib/Transforms/IPO/FunctionResolution.cpp2
-rw-r--r--lib/Transforms/IPO/GlobalDCE.cpp2
-rw-r--r--lib/Transforms/IPO/Internalize.cpp2
-rw-r--r--lib/Transforms/IPO/OldPoolAllocate.cpp4
-rw-r--r--lib/Transforms/IPO/SimpleStructMutation.cpp12
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp2
-rw-r--r--lib/Transforms/Utils/UnifyFunctionExitNodes.cpp2
9 files changed, 16 insertions, 16 deletions
diff --git a/lib/Transforms/IPO/ConstantMerge.cpp b/lib/Transforms/IPO/ConstantMerge.cpp
index 905c7a52eb..b979104401 100644
--- a/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/lib/Transforms/IPO/ConstantMerge.cpp
@@ -31,8 +31,8 @@ namespace {
}
};
-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 f276ca7c00..3473f526dc 100644
--- a/lib/Transforms/IPO/DeadTypeElimination.cpp
+++ b/lib/Transforms/IPO/DeadTypeElimination.cpp
@@ -30,7 +30,7 @@ namespace {
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 0d05611c94..44f8485121 100644
--- a/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/lib/Transforms/IPO/FunctionResolution.cpp
@@ -32,7 +32,7 @@ namespace {
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 a61b1ab592..029456ef5e 100644
--- a/lib/Transforms/IPO/GlobalDCE.cpp
+++ b/lib/Transforms/IPO/GlobalDCE.cpp
@@ -86,7 +86,7 @@ namespace {
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 b6a48b4e22..7ea7a6fff8 100644
--- a/lib/Transforms/IPO/Internalize.cpp
+++ b/lib/Transforms/IPO/Internalize.cpp
@@ -41,7 +41,7 @@ class InternalizePass : public Pass {
}
};
-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 c22d53ef91..43fd162d8e 100644
--- a/lib/Transforms/IPO/OldPoolAllocate.cpp
+++ b/lib/Transforms/IPO/OldPoolAllocate.cpp
@@ -315,8 +315,8 @@ namespace {
};
- 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 464d628e10..59871556ac 100644
--- a/lib/Transforms/IPO/SimpleStructMutation.cpp
+++ b/lib/Transforms/IPO/SimpleStructMutation.cpp
@@ -189,10 +189,10 @@ Pass *createSortElementsPass(const TargetData &TD) {
}
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 95cd5bea9a..98430f9c7a 100644
--- a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
+++ b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp
@@ -47,7 +47,7 @@ struct ProfilePaths : public FunctionPass {
}
};
-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 ef7d63e7cd..d3e20ac835 100644
--- a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
+++ b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
@@ -17,7 +17,7 @@ using std::vector;
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