#ifndef LLVM_ANALYSIS_INLINECOST_H
#define LLVM_ANALYSIS_INLINECOST_H
-#include "llvm/Analysis/CodeMetrics.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include <cassert>
#include <climits>
class CallSite;
class DataLayout;
class Function;
+class TargetTransformInfo;
namespace InlineConstants {
// Various magic constants used to adjust heuristics.
}
/// \brief Test whether the inline cost is low enough for inlining.
- operator bool() const {
+ LLVM_EXPLICIT operator bool() const {
return Cost < Threshold;
}
/// \brief Cost analyzer used by inliner.
class InlineCostAnalysis : public CallGraphSCCPass {
- const DataLayout *TD;
+ const TargetTransformInfo *TTI;
public:
static char ID;