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 | 1dd8c8560d45d36a8e507cd014352f1d313f9f9e (patch) | |
tree | 53ab7a4d1ce9e68688fe4b9ffa311474814613b1 /lib/CodeGen/TailDuplication.cpp | |
parent | 9d41bd5c78b99750d820e01bcd4a4e479b713d4c (diff) |
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TailDuplication.cpp')
-rw-r--r-- | lib/CodeGen/TailDuplication.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/TailDuplication.cpp b/lib/CodeGen/TailDuplication.cpp index ac4e2c4525..ac23e34da9 100644 --- a/lib/CodeGen/TailDuplication.cpp +++ b/lib/CodeGen/TailDuplication.cpp @@ -74,7 +74,6 @@ namespace { MachineFunctionPass(ID), PreRegAlloc(false) {} virtual bool runOnMachineFunction(MachineFunction &MF); - virtual const char *getPassName() const { return "Tail Duplication"; } private: void AddSSAUpdateEntry(unsigned OrigReg, unsigned NewReg, @@ -118,9 +117,10 @@ namespace { char TailDuplicatePass::ID = 0; } -FunctionPass *llvm::createTailDuplicatePass() { - return new TailDuplicatePass(); -} +char &llvm::TailDuplicateID = TailDuplicatePass::ID; + +INITIALIZE_PASS(TailDuplicatePass, "tailduplication", "Tail Duplication", + false, false) bool TailDuplicatePass::runOnMachineFunction(MachineFunction &MF) { TII = MF.getTarget().getInstrInfo(); |