Use DataLayout from the module when easily available.
[oota-llvm.git] / include / llvm / Analysis / InlineCost.h
index 3d815291781516e7dbb3acae23c8c7c18e2eb6a3..a9d8d313e45ca43fbf64cd805f59b44a4ef2201c 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef LLVM_ANALYSIS_INLINECOST_H
 #define LLVM_ANALYSIS_INLINECOST_H
 
-#include "llvm/Analysis/CodeMetrics.h"
 #include "llvm/Analysis/CallGraphSCCPass.h"
 #include <cassert>
 #include <climits>
@@ -23,6 +22,7 @@ namespace llvm {
 class CallSite;
 class DataLayout;
 class Function;
+class TargetTransformInfo;
 
 namespace InlineConstants {
   // Various magic constants used to adjust heuristics.
@@ -76,7 +76,7 @@ public:
   }
 
   /// \brief Test whether the inline cost is low enough for inlining.
-  operator bool() const {
+  LLVM_EXPLICIT operator bool() const {
     return Cost < Threshold;
   }
 
@@ -99,7 +99,7 @@ public:
 
 /// \brief Cost analyzer used by inliner.
 class InlineCostAnalysis : public CallGraphSCCPass {
-  const DataLayout *TD;
+  const TargetTransformInfo *TTI;
 
 public:
   static char ID;