diff options
author | Dan Gohman <gohman@apple.com> | 2008-05-13 02:05:11 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-05-13 02:05:11 +0000 |
commit | 6ddba2b933645d308428201e942abe1274fa5085 (patch) | |
tree | 02c986fdfaf2f67a232f705d77841290240c2f0b /lib/Transforms/Utils | |
parent | a72acf938902ea8ae2776cad7327257e88a63a54 (diff) | |
download | external_llvm-6ddba2b933645d308428201e942abe1274fa5085.zip external_llvm-6ddba2b933645d308428201e942abe1274fa5085.tar.gz external_llvm-6ddba2b933645d308428201e942abe1274fa5085.tar.bz2 |
Change class' public PassInfo variables to by initialized with the
address of the PassInfo directly instead of calling getPassInfo.
This eliminates a bunch of dynamic initializations of static data.
Also, fold RegisterPassBase into PassInfo, make a bunch of its
data members const, and rearrange some code to initialize data
members in constructors instead of using setter member functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51022 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/BreakCriticalEdges.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LCSSA.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LoopSimplify.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerSwitch.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/Mem2Reg.cpp | 2 |
7 files changed, 7 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/BreakCriticalEdges.cpp b/lib/Transforms/Utils/BreakCriticalEdges.cpp index 4bf7bac..bc9fdfd 100644 --- a/lib/Transforms/Utils/BreakCriticalEdges.cpp +++ b/lib/Transforms/Utils/BreakCriticalEdges.cpp @@ -55,7 +55,7 @@ static RegisterPass<BreakCriticalEdges> X("break-crit-edges", "Break critical edges in CFG"); // Publically exposed interface to pass... -const PassInfo *llvm::BreakCriticalEdgesID = X.getPassInfo(); +const PassInfo *const llvm::BreakCriticalEdgesID = &X; FunctionPass *llvm::createBreakCriticalEdgesPass() { return new BreakCriticalEdges(); } diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp index ff5f863..a98733b 100644 --- a/lib/Transforms/Utils/LCSSA.cpp +++ b/lib/Transforms/Utils/LCSSA.cpp @@ -100,7 +100,7 @@ char LCSSA::ID = 0; static RegisterPass<LCSSA> X("lcssa", "Loop-Closed SSA Form Pass"); LoopPass *llvm::createLCSSAPass() { return new LCSSA(); } -const PassInfo *llvm::LCSSAID = X.getPassInfo(); +const PassInfo *const llvm::LCSSAID = &X; /// runOnFunction - Process all loops in the function, inner-most out. bool LCSSA::runOnLoop(Loop *L, LPPassManager &LPM) { diff --git a/lib/Transforms/Utils/LoopSimplify.cpp b/lib/Transforms/Utils/LoopSimplify.cpp index 9351837..308819e 100644 --- a/lib/Transforms/Utils/LoopSimplify.cpp +++ b/lib/Transforms/Utils/LoopSimplify.cpp @@ -102,7 +102,7 @@ static RegisterPass<LoopSimplify> X("loopsimplify", "Canonicalize natural loops", true); // Publically exposed interface to pass... -const PassInfo *llvm::LoopSimplifyID = X.getPassInfo(); +const PassInfo *const llvm::LoopSimplifyID = &X; FunctionPass *llvm::createLoopSimplifyPass() { return new LoopSimplify(); } /// runOnFunction - Run down all loops in the CFG (recursively, but we could do diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index edce5e1..f65a716 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -73,7 +73,7 @@ static RegisterPass<LowerAllocations> X("lowerallocs", "Lower allocations from instructions to calls"); // Publically exposed interface to pass... -const PassInfo *llvm::LowerAllocationsID = X.getPassInfo(); +const PassInfo *const llvm::LowerAllocationsID = &X; // createLowerAllocationsPass - Interface to this file... Pass *llvm::createLowerAllocationsPass(bool LowerMallocArgToInteger) { return new LowerAllocations(LowerMallocArgToInteger); diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index 0530e52..4b7e3a3 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -104,7 +104,7 @@ char LowerInvoke::ID = 0; static RegisterPass<LowerInvoke> X("lowerinvoke", "Lower invoke and unwind, for unwindless code generators"); -const PassInfo *llvm::LowerInvokePassID = X.getPassInfo(); +const PassInfo *const llvm::LowerInvokePassID = &X; // Public Interface To the LowerInvoke pass. FunctionPass *llvm::createLowerInvokePass(const TargetLowering *TLI) { diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp index 9ddb2cd..c248478 100644 --- a/lib/Transforms/Utils/LowerSwitch.cpp +++ b/lib/Transforms/Utils/LowerSwitch.cpp @@ -84,7 +84,7 @@ static RegisterPass<LowerSwitch> X("lowerswitch", "Lower SwitchInst's to branches"); // Publically exposed interface to pass... -const PassInfo *llvm::LowerSwitchID = X.getPassInfo(); +const PassInfo *const llvm::LowerSwitchID = &X; // createLowerSwitchPass - Interface to this file... FunctionPass *llvm::createLowerSwitchPass() { return new LowerSwitch(); diff --git a/lib/Transforms/Utils/Mem2Reg.cpp b/lib/Transforms/Utils/Mem2Reg.cpp index e402bb9..1a936c0 100644 --- a/lib/Transforms/Utils/Mem2Reg.cpp +++ b/lib/Transforms/Utils/Mem2Reg.cpp @@ -84,7 +84,7 @@ bool PromotePass::runOnFunction(Function &F) { } // Publically exposed interface to pass... -const PassInfo *llvm::PromoteMemoryToRegisterID = X.getPassInfo(); +const PassInfo *const llvm::PromoteMemoryToRegisterID = &X; // createPromoteMemoryToRegister - Provide an entry point to create this pass. // FunctionPass *llvm::createPromoteMemoryToRegisterPass() { |