Lines Matching full:cost
51 InstructionCost Cost = 0; in getRISCVInstructionCost() local
55 Cost += TLI->getVRGatherVICost(VT); in getRISCVInstructionCost()
58 Cost += TLI->getVRGatherVVCost(VT); in getRISCVInstructionCost()
62 Cost += TLI->getVSlideVICost(VT); in getRISCVInstructionCost()
66 Cost += TLI->getVSlideVXCost(VT); in getRISCVInstructionCost()
82 Cost += Log2_32_Ceil(VL); in getRISCVInstructionCost()
89 Cost += VL; in getRISCVInstructionCost()
103 Cost += 1; in getRISCVInstructionCost()
106 Cost += LMULCost; in getRISCVInstructionCost()
109 return Cost; in getRISCVInstructionCost()
118 "getIntImmCost can only estimate cost of materialising integers"); in getIntImmCostImpl()
166 "getIntImmCost can only estimate cost of materialising integers"); in getIntImmCostInst()
184 // Use the materialization cost regardless of if it's the address or the in getIntImmCostInst()
202 // If the address is a constant, use the materialization cost. in getIntImmCostInst()
260 // Otherwise, use the full materialisation cost. in getIntImmCostInst()
339 // Add a cost of address generation + the cost of the load. The address in getConstantPoolLoadCost()
367 // give a more accurate cost than falling back to generic scalable codegen. in getShuffleCost()
398 // vrgather + cost of generating the mask constant. in getShuffleCost()
412 // 2 x (vrgather + cost of generating the mask constant) + cost of mask in getShuffleCost()
433 // multiple destinations. Providing an accurate cost only for splits where in getShuffleCost()
449 InstructionCost Cost = 0; in getShuffleCost() local
460 Cost += getShuffleCost(IsSingleVector ? TTI::SK_PermuteSingleSrc in getShuffleCost()
463 return Cost; in getShuffleCost()
516 // We use 2 for the cost of the mask materialization as this is the true in getShuffleCost()
517 // cost for small masks and most shuffles are small. At worst, this cost in getShuffleCost()
582 // At low LMUL, most of the cost is producing the vrgather index register. in getShuffleCost()
583 // At high LMUL, the cost of the vrgather itself will dominate. in getShuffleCost()
646 // FIXME: We use the memory op cost of the *legalized* type here, in getInterleavedMemoryOpCost()
647 // because it's getMemoryOpCost returns a really expensive cost for in getInterleavedMemoryOpCost()
649 // Factor=3 etc. Should the memory op cost of these be cheaper? in getInterleavedMemoryOpCost()
659 // TODO: Return the cost of interleaved accesses for scalable vector when in getInterleavedMemoryOpCost()
675 InstructionCost Cost = MemCost; in getInterleavedMemoryOpCost() local
683 Cost += ShuffleCost; in getInterleavedMemoryOpCost()
685 return Cost; in getInterleavedMemoryOpCost()
690 // inserts and extracts into subvectors, since they won't have the full cost in getInterleavedMemoryOpCost()
727 // Cost is proportional to the number of memory operations implied. For in getGatherScatterOpCost()
750 // Cost is proportional to the number of memory operations implied. For in getStridedMemoryOpCost()
938 InstructionCost Cost = getRISCVInstructionCost( in getIntrinsicInstrCost() local
946 Cost += getCmpSelInstrCost(Instruction::ICmp, BoolTy, RetTy, in getIntrinsicInstrCost()
951 return Cost; in getIntrinsicInstrCost()
955 unsigned Cost = 5; in getIntrinsicInstrCost() local
958 return Cost * LT.first; in getIntrinsicInstrCost()
963 unsigned Cost = 7; in getIntrinsicInstrCost() local
966 return Cost * LT.first; in getIntrinsicInstrCost()
976 unsigned Cost = 7; in getIntrinsicInstrCost() local
980 return Cost * LT.first; in getIntrinsicInstrCost()
1017 return LT.first * Entry->Cost; in getIntrinsicInstrCost()
1037 // FIXME: Need to compute legalizing cost for illegal types. in getCastInstrCost()
1089 InstructionCost Cost = 0; in getCastInstrCost() local
1097 Cost += getRISCVInstructionCost(Op, DstMVT, CostKind); in getCastInstrCost()
1099 return Cost; in getCastInstrCost()
1106 // The cost of convert from or to mask vector is different from other in getCastInstrCost()
1173 // Cost of Canonical Nan + branch in getMinMaxReductionCost()
1192 // Cost of Canonical Nan + branch in getMinMaxReductionCost()
1239 // Add a cost for data larger than LMUL8 in getMinMaxReductionCost()
1324 // Add a cost for data larger than LMUL8 in getArithmeticReductionCost()
1370 // We ignore the cost of the scalar constant materialization to be consistent in getStoreImmCost()
1390 InstructionCost Cost = 0; in getMemoryOpCost() local
1392 Cost += getStoreImmCost(Src, OpInfo, CostKind); in getMemoryOpCost()
1396 // Assume memory ops cost scale with the number of vector registers in getMemoryOpCost()
1402 return Cost + BaseCost; in getMemoryOpCost()
1467 // provided they incur the same cost across all implementations in getCmpSelInstrCost()
1481 // ScalarizeCost + Num * Cost for fixed vector, in getCmpSelInstrCost()
1489 // Assuming vector fp compare and mask instructions are all the same cost in getCmpSelInstrCost()
1523 // generate a conditional branch + mv. The cost of scalar (icmp + select) will in getCmpSelInstrCost()
1524 // be (0 + select instr cost). in getCmpSelInstrCost()
1536 // TODO: Add cost for scalar type. in getCmpSelInstrCost()
1566 // If Index is a known constant, cost is zero. in getVectorInstrCost()
1570 // scalarized; estimate cost of loads/stores sequence via the stack: in getVectorInstrCost()
1571 // ExtractElement cost: store vector to stack, load scalar; in getVectorInstrCost()
1572 // InsertElement cost: store vector to stack, store scalar, load vector. in getVectorInstrCost()
1669 // TODO: Handle more cost kinds. in getArithmeticInstrCost()
1697 // We return 0 for both as we currently ignore the cost of materializing in getArithmeticInstrCost()
1704 // Add the cost of materializing any constant vectors required. in getArithmeticInstrCost()
1756 // Assuming all other instructions have the same cost until a need arises to in getArithmeticInstrCost()
1777 InstructionCost Cost = TTI::TCC_Free; in getPointersChainCost() local
1784 // base, we just calculate cost of each non-Base GEP as an ADD operation if in getPointersChainCost()
1786 // If no known dependecies between the pointers cost is calculated as a sum in getPointersChainCost()
1808 Cost += getArithmeticInstrCost(Instruction::Add, GEP->getType(), CostKind, in getPointersChainCost()
1814 Cost += getGEPCost(GEP->getSourceElementType(), GEP->getPointerOperand(), in getPointersChainCost()
1818 return Cost; in getPointersChainCost()
1863 InstructionCost Cost = 0; in getUnrollingPreferences() local
1880 Cost += getInstructionCost(&I, Operands, in getUnrollingPreferences()
1885 LLVM_DEBUG(dbgs() << "Cost of loop: " << Cost << "\n"); in getUnrollingPreferences()
1894 // taken cost of the backedge. in getUnrollingPreferences()
1895 if (Cost < 12) in getUnrollingPreferences()