Lines Matching defs:Cost
1 //===- InlineCost.h - Cost analysis for inliner -----------------*- C++ -*-===//
58 const int Cost;
64 InlineCost(int Cost, int Threshold) : Cost(Cost), Threshold(Threshold) {}
67 static InlineCost get(int Cost, int Threshold) {
68 assert(Cost > AlwaysInlineCost && "Cost crosses sentinel value");
69 assert(Cost < NeverInlineCost && "Cost crosses sentinel value");
70 return InlineCost(Cost, Threshold);
81 return Cost < Threshold;
84 bool isAlways() const { return Cost == AlwaysInlineCost; }
85 bool isNever() const { return Cost == NeverInlineCost; }
92 return Cost;
101 /// \brief Cost analyzer used by inliner.