diff options
author | Andrew Trick <atrick@apple.com> | 2012-02-08 21:23:13 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-02-08 21:23:13 +0000 |
commit | 1fa5bcbe2ae447344d6cbba3f19daa9a5bed5de8 (patch) | |
tree | aa75a14f62673ecf5b1e2c4e17c1289336597211 /llvm/lib/CodeGen/StackSlotColoring.cpp | |
parent | c40815de62286ee6e324cb0a342db85e0a5a3c23 (diff) | |
download | bcm5719-llvm-1fa5bcbe2ae447344d6cbba3f19daa9a5bed5de8.tar.gz bcm5719-llvm-1fa5bcbe2ae447344d6cbba3f19daa9a5bed5de8.zip |
Codegen pass definition cleanup. No functionality.
Moving toward a uniform style of pass definition to allow easier target configuration.
Globally declare Pass ID.
Globally declare pass initializer.
Use INITIALIZE_PASS consistently.
Add a call to the initializer from CodeGen.cpp.
Remove redundant "createPass" functions and "getPassName" methods.
While cleaning up declarations, cleaned up comments (sorry for large diff).
llvm-svn: 150100
Diffstat (limited to 'llvm/lib/CodeGen/StackSlotColoring.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackSlotColoring.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp index 908d108c6ee..d54ac2670ae 100644 --- a/llvm/lib/CodeGen/StackSlotColoring.cpp +++ b/llvm/lib/CodeGen/StackSlotColoring.cpp @@ -86,10 +86,6 @@ namespace { MachineFunctionPass(ID), ColorWithRegs(false), NextColor(-1) { initializeStackSlotColoringPass(*PassRegistry::getPassRegistry()); } - StackSlotColoring(bool RegColor) : - MachineFunctionPass(ID), ColorWithRegs(RegColor), NextColor(-1) { - initializeStackSlotColoringPass(*PassRegistry::getPassRegistry()); - } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); @@ -105,9 +101,6 @@ namespace { } virtual bool runOnMachineFunction(MachineFunction &MF); - virtual const char* getPassName() const { - return "Stack Slot Coloring"; - } private: void InitializeSlots(); @@ -122,6 +115,7 @@ namespace { } // end anonymous namespace char StackSlotColoring::ID = 0; +char &llvm::StackSlotColoringID = StackSlotColoring::ID; INITIALIZE_PASS_BEGIN(StackSlotColoring, "stack-slot-coloring", "Stack Slot Coloring", false, false) @@ -132,10 +126,6 @@ INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo) INITIALIZE_PASS_END(StackSlotColoring, "stack-slot-coloring", "Stack Slot Coloring", false, false) -FunctionPass *llvm::createStackSlotColoringPass() { - return new StackSlotColoring(/*RegColor=*/false); -} - namespace { // IntervalSorter - Comparison predicate that sort live intervals by // their weight. |