Lines Matching full:cost
15 // cost. If the constant can be folded into the instruction (the cost is
16 // TCC_Free) or the cost is just a simple operation (TCC_BASIC), then we don't
20 // If the cost is more than TCC_BASIC, then the integer constant can't be folded
81 /// \brief Add the user to the use list and update the cost.
82 void addUser(Instruction *Inst, unsigned Idx, unsigned Cost) {
83 CumulativeCost += Cost;
279 unsigned Cost;
280 // Ask the target about the cost of materializing the constant for the given
283 Cost = TTI->getIntImmCost(IntrInst->getIntrinsicID(), Idx,
286 Cost = TTI->getIntImmCost(Inst->getOpcode(), Idx, ConstInt->getValue(),
290 if (Cost > TargetTransformInfo::TCC_Basic) {
298 ConstCandVec[Itr->second].addUser(Inst, Idx, Cost);
301 << " with cost " << Cost << '\n';
304 << *Inst << " via " << *Inst->getOperand(Idx) << " with cost "
305 << Cost << '\n';
379 // Use the constant that has the maximum cost as base constant.