diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-23 18:06:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-23 18:06:35 +0000 |
commit | f629309f74cf1a64aa7fd1cd5784fd7db9a8f59e (patch) | |
tree | baf1f59f5f0ba41f4bd1711c4155bbe328e6d041 /lib/Transforms/IPO | |
parent | af41a12370010325eb163b734d5757a7f0296e67 (diff) | |
download | external_llvm-f629309f74cf1a64aa7fd1cd5784fd7db9a8f59e.zip external_llvm-f629309f74cf1a64aa7fd1cd5784fd7db9a8f59e.tar.gz external_llvm-f629309f74cf1a64aa7fd1cd5784fd7db9a8f59e.tar.bz2 |
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r-- | lib/Transforms/IPO/GlobalDCE.cpp | 3 | ||||
-rw-r--r-- | lib/Transforms/IPO/Internalize.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/IPO/OldPoolAllocate.cpp | 5 |
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 |