Lines Matching refs:Cost
1 //===- InlineCost.h - Cost analysis for inliner -----------------*- C++ -*-===//
61 const int Cost;
67 InlineCost(int Cost, int Threshold)
68 : Cost(Cost), Threshold(Threshold) {}
71 static InlineCost get(int Cost, int Threshold) {
72 assert(Cost > AlwaysInlineCost && "Cost crosses sentinel value");
73 assert(Cost < NeverInlineCost && "Cost crosses sentinel value");
74 return InlineCost(Cost, Threshold);
85 return Cost < Threshold;
88 bool isAlways() const { return Cost == AlwaysInlineCost; }
89 bool isNever() const { return Cost == NeverInlineCost; }
96 return Cost;
105 /// InlineCostAnalyzer - Cost analyzer used by inliner.