Lines Matching refs:Ty
40 unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract) const;
43 unsigned getAltShuffleOverhead(Type *Ty) const;
81 bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV,
84 int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
88 bool isTypeLegal(Type *Ty) const override;
92 bool haveFastSqrt(Type *Ty) const override;
104 unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind,
120 unsigned getAddressComputationCost( Type *Ty, bool IsComplex) const override;
121 unsigned getReductionCost(unsigned Opcode, Type *Ty,
148 bool BasicTTI::isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV,
156 return getTLI()->isLegalAddressingMode(AM, Ty);
159 int BasicTTI::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV,
167 return getTLI()->getScalingFactorCost(AM, Ty);
174 bool BasicTTI::isTypeLegal(Type *Ty) const {
175 EVT T = getTLI()->getValueType(Ty);
194 bool BasicTTI::haveFastSqrt(Type *Ty) const {
196 EVT VT = TLI->getValueType(Ty);
262 unsigned BasicTTI::getScalarizationOverhead(Type *Ty, bool Insert,
264 assert (Ty->isVectorTy() && "Can only scalarize vectors");
267 for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) {
269 Cost += TopTTI->getVectorInstrCost(Instruction::InsertElement, Ty, i);
271 Cost += TopTTI->getVectorInstrCost(Instruction::ExtractElement, Ty, i);
289 unsigned BasicTTI::getArithmeticInstrCost(unsigned Opcode, Type *Ty,
297 std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Ty);
299 bool IsFloat = Ty->getScalarType()->isFloatingPointTy();
321 if (Ty->isVectorTy()) {
322 unsigned Num = Ty->getVectorNumElements();
323 unsigned Cost = TopTTI->getArithmeticInstrCost(Opcode, Ty->getScalarType());
326 return getScalarizationOverhead(Ty, true, true) + Num * Cost;
333 unsigned BasicTTI::getAltShuffleOverhead(Type *Ty) const {
334 assert(Ty->isVectorTy() && "Can only shuffle vectors");
343 for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) {
344 Cost += TopTTI->getVectorInstrCost(Instruction::InsertElement, Ty, i);
345 Cost += TopTTI->getVectorInstrCost(Instruction::ExtractElement, Ty, i);
624 unsigned BasicTTI::getAddressComputationCost(Type *Ty, bool IsComplex) const {
628 unsigned BasicTTI::getReductionCost(unsigned Opcode, Type *Ty,
630 assert(Ty->isVectorTy() && "Expect a vector type");
631 unsigned NumVecElts = Ty->getVectorNumElements();
634 TopTTI->getArithmeticInstrCost(Opcode, Ty);
638 TopTTI->getShuffleCost(SK_ExtractSubvector, Ty, NumVecElts / 2, Ty);
639 return ShuffleCost + ArithCost + getScalarizationOverhead(Ty, false, true);