Lines Matching full:cost
29 static cl::opt<bool> VecMaskCost("ppc-vec-mask-cost",
30 cl::desc("add masking cost for i1 vectors"), cl::init(true), cl::Hidden);
41 LsrNoInsnsCost("ppc-lsr-no-insns-cost", cl::Hidden, cl::init(false),
42 cl::desc("Do not add instruction count to lsr cost model"));
53 // PPC cost model.
332 // Instructions that need to be split should cost more. in getInstructionCost()
409 // often outweigh the cost of a division to compute the trip count. in getUnrollingPreferences()
549 // Returns a cost adjustment factor to adjust the cost of vector instructions
552 // An invalid instruction cost is returned if the type is an MMA vector type.
556 // instruction cost is returned. This is to signify to other cost computing in vectorCostAdjustmentFactor()
557 // functions to return the maximum instruction cost in order to prevent any in vectorCostAdjustmentFactor()
567 // double the cost at every step - only the last step. in vectorCostAdjustmentFactor()
595 // TODO: Handle more cost kinds. in getArithmeticInstrCost()
601 InstructionCost Cost = BaseT::getArithmeticInstrCost( in getArithmeticInstrCost() local
603 return Cost * CostFactor; in getArithmeticInstrCost()
649 InstructionCost Cost = in getCastInstrCost() local
651 Cost *= CostFactor; in getCastInstrCost()
654 return Cost == 0 ? 0 : 1; in getCastInstrCost()
655 return Cost; in getCastInstrCost()
668 InstructionCost Cost = in getCmpSelInstrCost() local
670 // TODO: Handle other cost kinds. in getCmpSelInstrCost()
672 return Cost; in getCmpSelInstrCost()
673 return Cost * CostFactor; in getCmpSelInstrCost()
689 InstructionCost Cost = in getVectorInstrCost() local
691 Cost *= CostFactor; in getVectorInstrCost()
699 return Cost; in getVectorInstrCost()
711 // Assume vector operation cost for both (cost will be 2x on P9). in getVectorInstrCost()
733 // We need a vector extract (or mfvsrld). Assume vector operation cost. in getVectorInstrCost()
734 // The cost of the load constant for a vector extract is disregarded in getVectorInstrCost()
739 // Assume permute has standard cost. in getVectorInstrCost()
740 // Assume move-to/move-from VSR have 2x standard cost. in getVectorInstrCost()
747 // Estimated cost of a load-hit-store delay. This was obtained in getVectorInstrCost()
761 return LHSPenalty + Cost; in getVectorInstrCost()
763 return Cost; in getVectorInstrCost()
785 InstructionCost Cost = in getMemoryOpCost() local
787 // TODO: Handle other cost kinds. in getMemoryOpCost()
789 return Cost; in getMemoryOpCost()
791 Cost *= CostFactor; in getMemoryOpCost()
801 // PPCTargetLowering can't compute the cost appropriately. So here we in getMemoryOpCost()
812 return Cost; in getMemoryOpCost()
816 // one permute (the last load in a series has extra cost, but we're in getMemoryOpCost()
823 return Cost + LT.first; // Add the cost of the permutations. in getMemoryOpCost()
827 // load sequence, so that might be used instead, but regardless, the net cost in getMemoryOpCost()
830 return Cost; in getMemoryOpCost()
834 return Cost; in getMemoryOpCost()
839 // Add the cost of each scalar load or store. in getMemoryOpCost()
841 Cost += LT.first * ((SrcBytes / Alignment->value()) - 1); in getMemoryOpCost()
849 Cost += getVectorInstrCost(Instruction::ExtractElement, Src, CostKind, i, in getMemoryOpCost()
852 return Cost; in getMemoryOpCost()
875 // Firstly, the cost of load/store operation. in getInterleavedMemoryOpCost()
876 InstructionCost Cost = getMemoryOpCost(Opcode, VecTy, MaybeAlign(Alignment), in getInterleavedMemoryOpCost() local
884 Cost += Factor*(LT.first-1); in getInterleavedMemoryOpCost()
886 return Cost; in getInterleavedMemoryOpCost()
1048 InstructionCost Cost = BaseT::getVPMemoryOpCost(Opcode, Src, Alignment, in getVPMemoryOpCost() local
1051 return Cost; in getVPMemoryOpCost()
1052 // TODO: Handle other cost kinds. in getVPMemoryOpCost()
1054 return Cost; in getVPMemoryOpCost()
1070 InstructionCost Cost = LT.first * CostFactor; in getVPMemoryOpCost() local
1071 assert(Cost.isValid() && "Expected valid cost"); in getVPMemoryOpCost()
1074 // pipeline flush. Otherwise the VSX masked memops cost the same as unmasked in getVPMemoryOpCost()
1078 return Cost; in getVPMemoryOpCost()
1088 (AlignmentProb * *Cost.getValue()); in getVPMemoryOpCost()
1092 // model the cost of legalization. Currently we can only lower intrinsics with in getVPMemoryOpCost()