Revert (most of) r185393 and r185395.

"Remove floating point computations form SpillPlacement.cpp."

These commits caused test failures in lencod on clang-native-arm-lnt.

I suspect these changes are only exposing an existing issue, but
reverting anyway to keep the bots passing while we investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185447 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SpillPlacement.h b/lib/CodeGen/SpillPlacement.h
index a0480d5..fc412f8 100644
--- a/lib/CodeGen/SpillPlacement.h
+++ b/lib/CodeGen/SpillPlacement.h
@@ -30,7 +30,6 @@
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/CodeGen/MachineFunctionPass.h"
-#include "llvm/Support/BlockFrequency.h"
 
 namespace llvm {
 
@@ -58,7 +57,7 @@
   SmallVector<unsigned, 8> RecentPositive;
 
   // Block frequencies are computed once. Indexed by block number.
-  SmallVector<BlockFrequency, 4> BlockFrequencies;
+  SmallVector<float, 4> BlockFrequency;
 
 public:
   static char ID; // Pass identification, replacement for typeid.
@@ -141,9 +140,7 @@
   /// getBlockFrequency - Return the estimated block execution frequency per
   /// function invocation.
   float getBlockFrequency(unsigned Number) const {
-    // FIXME: Return the BlockFrequency directly.
-    const float Scale = 1.0f / BlockFrequency::getEntryFrequency();
-    return BlockFrequencies[Number].getFrequency() * Scale;
+    return BlockFrequency[Number];
   }
 
 private: