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 | 0479aa5c0b38c0ba1f77ecc164167ae7f9a92925 (patch) | |
tree | 46303f09156df9cad0ea7fa21037fd7d6d90c725 /llvm/lib/CodeGen | |
parent | 53c5c62d6d144ef7c51414d7357579a9e7d43384 (diff) | |
download | bcm5719-llvm-0479aa5c0b38c0ba1f77ecc164167ae7f9a92925.tar.gz bcm5719-llvm-0479aa5c0b38c0ba1f77ecc164167ae7f9a92925.zip |
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.
llvm-svn: 51022
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MachineDominators.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MachineLoopInfo.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/PHIElimination.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/StrongPHIElimination.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineDominators.cpp b/llvm/lib/CodeGen/MachineDominators.cpp index 0710c10d967..8f679936209 100644 --- a/llvm/lib/CodeGen/MachineDominators.cpp +++ b/llvm/lib/CodeGen/MachineDominators.cpp @@ -25,4 +25,4 @@ char MachineDominatorTree::ID = 0; static RegisterPass<MachineDominatorTree> E("machinedomtree", "MachineDominator Tree Construction", true); -const PassInfo *llvm::MachineDominatorsID = E.getPassInfo(); +const PassInfo *const llvm::MachineDominatorsID = &E; diff --git a/llvm/lib/CodeGen/MachineLoopInfo.cpp b/llvm/lib/CodeGen/MachineLoopInfo.cpp index ac3df435008..68ddb7b3f47 100644 --- a/llvm/lib/CodeGen/MachineLoopInfo.cpp +++ b/llvm/lib/CodeGen/MachineLoopInfo.cpp @@ -26,7 +26,7 @@ char MachineLoopInfo::ID = 0; static RegisterPass<MachineLoopInfo> X("machine-loops", "Machine Natural Loop Construction", true); -const PassInfo *llvm::MachineLoopInfoID = X.getPassInfo(); +const PassInfo *const llvm::MachineLoopInfoID = &X; bool MachineLoopInfo::runOnMachineFunction(MachineFunction &) { releaseMemory(); diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp index 4a9077a0638..4e2ed678e19 100644 --- a/llvm/lib/CodeGen/PHIElimination.cpp +++ b/llvm/lib/CodeGen/PHIElimination.cpp @@ -79,7 +79,7 @@ char PNE::ID = 0; static RegisterPass<PNE> X("phi-node-elimination", "Eliminate PHI nodes for register allocation"); -const PassInfo *llvm::PHIEliminationID = X.getPassInfo(); +const PassInfo *const llvm::PHIEliminationID = &X; bool PNE::runOnMachineFunction(MachineFunction &Fn) { MRI = &Fn.getRegInfo(); diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp index 2526d4d8461..5e18534c9e0 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -58,7 +58,7 @@ X("simple-register-coalescing", "Simple Register Coalescing"); // Declare that we implement the RegisterCoalescer interface static RegisterAnalysisGroup<RegisterCoalescer, true/*The Default*/> V(X); -const PassInfo *llvm::SimpleRegisterCoalescingID = X.getPassInfo(); +const PassInfo *const llvm::SimpleRegisterCoalescingID = &X; void SimpleRegisterCoalescing::getAnalysisUsage(AnalysisUsage &AU) const { AU.addPreserved<LiveIntervals>(); diff --git a/llvm/lib/CodeGen/StrongPHIElimination.cpp b/llvm/lib/CodeGen/StrongPHIElimination.cpp index 79f8f507c68..97e4fb9b6e7 100644 --- a/llvm/lib/CodeGen/StrongPHIElimination.cpp +++ b/llvm/lib/CodeGen/StrongPHIElimination.cpp @@ -147,7 +147,7 @@ static RegisterPass<StrongPHIElimination> X("strong-phi-node-elimination", "Eliminate PHI nodes for register allocation, intelligently"); -const PassInfo *llvm::StrongPHIEliminationID = X.getPassInfo(); +const PassInfo *const llvm::StrongPHIEliminationID = &X; /// computeDFS - Computes the DFS-in and DFS-out numbers of the dominator tree /// of the given MachineFunction. These numbers are then used in other parts diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index f343ff40d81..1e24914f3fc 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -81,7 +81,7 @@ char TwoAddressInstructionPass::ID = 0; static RegisterPass<TwoAddressInstructionPass> X("twoaddressinstruction", "Two-Address instruction pass"); -const PassInfo *llvm::TwoAddressInstructionPassID = X.getPassInfo(); +const PassInfo *const llvm::TwoAddressInstructionPassID = &X; /// Sink3AddrInstruction - A two-address instruction has been converted to a /// three-address instruction to avoid clobbering a register. Try to sink it |