refactor a blob of code out to a new 'FoldOrOfFCmps' function and
[oota-llvm.git] / lib / Transforms / Scalar / BasicBlockPlacement.cpp
index b8f1d50b69adf92d940ee497b2455f3f90bab971..fb9b88005b6a8d712ac8e7b82d7d7f594b2709af 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -41,8 +41,8 @@ STATISTIC(NumMoved, "Number of basic blocks moved");
 
 namespace {
   struct VISIBILITY_HIDDEN BlockPlacement : public FunctionPass {
-    static const char ID; // Pass identifcation, replacement for typeid
-    BlockPlacement() : FunctionPass((intptr_t)&ID) {}
+    static char ID; // Pass identification, replacement for typeid
+    BlockPlacement() : FunctionPass(&ID) {}
 
     virtual bool runOnFunction(Function &F);
 
@@ -72,12 +72,12 @@ namespace {
     /// successors.
     void PlaceBlocks(BasicBlock *BB);
   };
-
-  const char BlockPlacement::ID = 0;
-  RegisterPass<BlockPlacement> X("block-placement",
-                                 "Profile Guided Basic Block Placement");
 }
 
+char BlockPlacement::ID = 0;
+static RegisterPass<BlockPlacement>
+X("block-placement", "Profile Guided Basic Block Placement");
+
 FunctionPass *llvm::createBlockPlacementPass() { return new BlockPlacement(); }
 
 bool BlockPlacement::runOnFunction(Function &F) {