summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstrBundle.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-02-08 21:23:13 +0000
committerAndrew Trick <atrick@apple.com>2012-02-08 21:23:13 +0000
commit1fa5bcbe2ae447344d6cbba3f19daa9a5bed5de8 (patch)
treeaa75a14f62673ecf5b1e2c4e17c1289336597211 /llvm/lib/CodeGen/MachineInstrBundle.cpp
parentc40815de62286ee6e324cb0a342db85e0a5a3c23 (diff)
downloadbcm5719-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/MachineInstrBundle.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstrBundle.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/MachineInstrBundle.cpp b/llvm/lib/CodeGen/MachineInstrBundle.cpp
index b96bb1d9c91..d8b2b3a6cec 100644
--- a/llvm/lib/CodeGen/MachineInstrBundle.cpp
+++ b/llvm/lib/CodeGen/MachineInstrBundle.cpp
@@ -31,13 +31,10 @@ namespace {
} // end anonymous namespace
char UnpackMachineBundles::ID = 0;
+char &llvm::UnpackMachineBundlesID = UnpackMachineBundles::ID;
INITIALIZE_PASS(UnpackMachineBundles, "unpack-mi-bundles",
"Unpack machine instruction bundles", false, false)
-FunctionPass *llvm::createUnpackMachineBundlesPass() {
- return new UnpackMachineBundles();
-}
-
bool UnpackMachineBundles::runOnMachineFunction(MachineFunction &MF) {
bool Changed = false;
for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I) {
@@ -85,13 +82,10 @@ namespace {
} // end anonymous namespace
char FinalizeMachineBundles::ID = 0;
+char &llvm::FinalizeMachineBundlesID = FinalizeMachineBundles::ID;
INITIALIZE_PASS(FinalizeMachineBundles, "finalize-mi-bundles",
"Finalize machine instruction bundles", false, false)
-FunctionPass *llvm::createFinalizeMachineBundlesPass() {
- return new FinalizeMachineBundles();
-}
-
bool FinalizeMachineBundles::runOnMachineFunction(MachineFunction &MF) {
return llvm::finalizeBundles(MF);
}
OpenPOWER on IntegriCloud