Revert r269131

llvm-svn: 269138
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp
index 87dac72..d3b2930 100644
--- a/llvm/lib/Analysis/InlineCost.cpp
+++ b/llvm/lib/Analysis/InlineCost.cpp
@@ -30,7 +30,6 @@
 #include "llvm/IR/InstVisitor.h"
 #include "llvm/IR/IntrinsicInst.h"
 #include "llvm/IR/Operator.h"
-#include "llvm/ProfileData/ProfileCommon.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 
@@ -631,11 +630,10 @@
   // a well-tuned heuristic based on *callsite* hotness and not callee hotness.
   uint64_t FunctionCount = 0, MaxFunctionCount = 0;
   bool HasPGOCounts = false;
-  ProfileSummary *PS = ProfileSummary::getProfileSummary(Callee.getParent());
-  if (Callee.getEntryCount() && PS) {
+  if (Callee.getEntryCount() && Callee.getParent()->getMaximumFunctionCount()) {
     HasPGOCounts = true;
     FunctionCount = Callee.getEntryCount().getValue();
-    MaxFunctionCount = PS->getMaxFunctionCount();
+    MaxFunctionCount = Callee.getParent()->getMaximumFunctionCount().getValue();
   }
 
   // Listen to the inlinehint attribute or profile based hotness information