summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-23 18:06:30 +0000
committerChris Lattner <sabre@nondot.org>2002-07-23 18:06:30 +0000
commit6788f25f997f95505f3bfac89af2649f3660164d (patch)
tree499bbea4a7400679ff6ebf16f3522836b3d40d95 /llvm/lib/Transforms
parent6d216fdc1fd86ea4321021a413c5b6acd0136c3d (diff)
downloadbcm5719-llvm-6788f25f997f95505f3bfac89af2649f3660164d.tar.gz
bcm5719-llvm-6788f25f997f95505f3bfac89af2649f3660164d.zip
* Remove getPassName implementation
* Register all Passes llvm-svn: 3015
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/ConstantMerge.cpp4
-rw-r--r--llvm/lib/Transforms/IPO/FunctionResolution.cpp3
-rw-r--r--llvm/lib/Transforms/IPO/InlineSimple.cpp2
-rw-r--r--llvm/lib/Transforms/IPO/RaiseAllocations.cpp6
-rw-r--r--llvm/lib/Transforms/Scalar/LowerAllocations.cpp9
5 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/IPO/ConstantMerge.cpp b/llvm/lib/Transforms/IPO/ConstantMerge.cpp
index 9a67dbdf198..71eadbf9829 100644
--- a/llvm/lib/Transforms/IPO/ConstantMerge.cpp
+++ b/llvm/lib/Transforms/IPO/ConstantMerge.cpp
@@ -23,8 +23,6 @@ static Statistic<> NumMerged("constmerge\t\t- Number of global constants merged"
namespace {
struct ConstantMerge : public Pass {
- const char *getPassName() const {return "Merge Duplicate Global Constants";}
-
// run - For this pass, process all of the globals in the module,
// eliminating duplicate constants.
//
@@ -34,6 +32,8 @@ namespace {
AU.preservesCFG();
}
};
+
+RegisterPass<ConstantMerge> X("constmerge", "Merge Duplicate Global Constants");
}
Pass *createConstantMergePass() { return new ConstantMerge(); }
diff --git a/llvm/lib/Transforms/IPO/FunctionResolution.cpp b/llvm/lib/Transforms/IPO/FunctionResolution.cpp
index 683512689e3..19188cbfd19 100644
--- a/llvm/lib/Transforms/IPO/FunctionResolution.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionResolution.cpp
@@ -30,10 +30,9 @@ namespace {
Statistic<>NumResolved("funcresolve\t- Number of varargs functions resolved");
struct FunctionResolvingPass : public Pass {
- const char *getPassName() const { return "Resolve Functions"; }
-
bool run(Module &M);
};
+ RegisterPass<FunctionResolvingPass> X("funcresolve", "Resolve Functions");
}
Pass *createFunctionResolvingPass() {
diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp
index 7d36e379bca..3c76a339eca 100644
--- a/llvm/lib/Transforms/IPO/InlineSimple.cpp
+++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp
@@ -257,11 +257,11 @@ static bool doFunctionInlining(Function &F) {
namespace {
struct FunctionInlining : public FunctionPass {
- const char *getPassName() const { return "Function Inlining"; }
virtual bool runOnFunction(Function &F) {
return doFunctionInlining(F);
}
};
+ RegisterPass<FunctionInlining> X("inline", "Function Integration/Inlining");
}
Pass *createFunctionInliningPass() { return new FunctionInlining(); }
diff --git a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
index 9ab3d5faf94..083be039e2a 100644
--- a/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/llvm/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -26,9 +26,7 @@ class RaiseAllocations : public BasicBlockPass {
Function *MallocFunc; // Functions in the module we are processing
Function *FreeFunc; // Initialized by doPassInitializationVirt
public:
- inline RaiseAllocations() : MallocFunc(0), FreeFunc(0) {}
-
- const char *getPassName() const { return "Raise Allocations"; }
+ RaiseAllocations() : MallocFunc(0), FreeFunc(0) {}
// doPassInitialization - For the raise allocations pass, this finds a
// declaration for malloc and free if they exist.
@@ -41,6 +39,8 @@ public:
bool runOnBasicBlock(BasicBlock &BB);
};
+RegisterPass<RaiseAllocations>
+X("raiseallocs", "Raise allocations from calls to instructions");
} // end anonymous namespace
diff --git a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
index 003be33182a..a50cd8a5d11 100644
--- a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp
@@ -31,12 +31,10 @@ class LowerAllocations : public BasicBlockPass {
const TargetData &DataLayout;
public:
- inline LowerAllocations(const TargetData &TD) : DataLayout(TD) {
+ LowerAllocations(const TargetData &TD) : DataLayout(TD) {
MallocFunc = FreeFunc = 0;
}
- const char *getPassName() const { return "Lower Allocations"; }
-
// doPassInitialization - For the lower allocations pass, this ensures that a
// module contains a declaration for a malloc and a free function.
//
@@ -47,7 +45,6 @@ public:
//
bool runOnBasicBlock(BasicBlock &BB);
};
-
}
// createLowerAllocationsPass - Interface to this file...
@@ -55,6 +52,10 @@ Pass *createLowerAllocationsPass(const TargetData &TD) {
return new LowerAllocations(TD);
}
+static RegisterPass<LowerAllocations>
+X("lowerallocs", "Lower allocations from instructions to calls (TD)",
+ createLowerAllocationsPass);
+
// doInitialization - For the lower allocations pass, this ensures that a
// module contains a declaration for a malloc and a free function.
OpenPOWER on IntegriCloud