Home | History | Annotate | Download | only in CodeGen

Lines Matching defs:Ty

85   unsigned getPermuteShuffleOverhead(Type *Ty) {
86 assert(Ty->isVectorTy() && "Can only shuffle vectors");
95 for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) {
97 ->getVectorInstrCost(Instruction::InsertElement, Ty, i);
99 ->getVectorInstrCost(Instruction::ExtractElement, Ty, i);
149 bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
157 return getTLI()->isLegalAddressingMode(DL, AM, Ty, AddrSpace, I);
164 int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
171 return getTLI()->getScalingFactorCost(DL, AM, Ty, AddrSpace);
182 bool isTypeLegal(Type *Ty) {
183 EVT VT = getTLI()->getValueType(DL, Ty);
293 bool haveFastSqrt(Type *Ty) {
295 EVT VT = TLI->getValueType(DL, Ty);
300 unsigned getFPOpCost(Type *Ty) {
306 unsigned getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) {
311 if (TLI->isTruncateFree(OpTy, Ty))
315 if (TLI->isZExtFree(OpTy, Ty))
320 return BaseT::getOperationCost(Opcode, Ty, OpTy);
408 unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract) {
409 assert(Ty->isVectorTy() && "Can only scalarize vectors");
412 for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) {
415 ->getVectorInstrCost(Instruction::InsertElement, Ty, i);
418 ->getVectorInstrCost(Instruction::ExtractElement, Ty, i);
470 unsigned Opcode, Type *Ty,
481 std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(DL, Ty);
483 bool IsFloat = Ty->isFPOrFPVectorTy();
503 if (Ty->isVectorTy()) {
504 unsigned Num = Ty->getVectorNumElements();
506 ->getArithmeticInstrCost(Opcode, Ty->getScalarType());
509 return getScalarizationOverhead(Ty, Args) + Num * Cost;
937 Type *Ty = Tys[i];
938 if (Ty->isVectorTy()) {
940 ScalarizationCost += getScalarizationOverhead(Ty, false, true);
941 ScalarCalls = std::max(ScalarCalls, Ty->getVectorNumElements());
942 Ty = Ty->getScalarType();
944 ScalarTys.push_back(Ty);
1095 Type *Ty = Tys[i];
1096 if (Ty->isVectorTy())
1097 Ty = Ty->getScalarType();
1098 ScalarTys.push_back(Ty);
1137 unsigned getAddressComputationCost(Type *Ty, ScalarEvolution *,
1177 unsigned getArithmeticReductionCost(unsigned Opcode, Type *Ty,
1179 assert(Ty->isVectorTy() && "Expect a vector type");
1180 Type *ScalarTy = Ty->getVectorElementType();
1181 unsigned NumVecElts = Ty->getVectorNumElements();
1187 ConcreteTTI->getTLI()->getTypeLegalizationCost(DL, Ty);
1195 ConcreteTTI->getShuffleCost(TTI::SK_ExtractSubvector, Ty,
1196 NumVecElts, Ty);
1197 ArithCost += ConcreteTTI->getArithmeticInstrCost(Opcode, Ty);
1198 Ty = VectorType::get(ScalarTy, NumVecElts);
1206 ConcreteTTI->getShuffleCost(TTI::SK_ExtractSubvector, Ty,
1207 NumVecElts, Ty);
1209 ConcreteTTI->getArithmeticInstrCost(Opcode, Ty);
1210 return ShuffleCost + ArithCost + getScalarizationOverhead(Ty, false, true);
1215 unsigned getMinMaxReductionCost(Type *Ty, Type *CondTy, bool IsPairwise,
1217 assert(Ty->isVectorTy() && "Expect a vector type");
1218 Type *ScalarTy = Ty->getVectorElementType();
1220 unsigned NumVecElts = Ty->getVectorNumElements();
1223 if (Ty->isFPOrFPVectorTy()) {
1226 assert(Ty->isIntOrIntVectorTy() &&
1234 ConcreteTTI->getTLI()->getTypeLegalizationCost(DL, Ty);
1242 ConcreteTTI->getShuffleCost(TTI::SK_ExtractSubvector, Ty,
1243 NumVecElts, Ty);
1245 ConcreteTTI->getCmpSelInstrCost(CmpOpcode, Ty, CondTy, nullptr) +
1246 ConcreteTTI->getCmpSelInstrCost(Instruction::Select, Ty, CondTy,
1248 Ty = VectorType::get(ScalarTy, NumVecElts);
1257 ConcreteTTI->getShuffleCost(TTI::SK_ExtractSubvector, Ty,
1258 NumVecElts, Ty);
1261 (ConcreteTTI->getCmpSelInstrCost(CmpOpcode, Ty, CondTy, nullptr) +
1262 ConcreteTTI->getCmpSelInstrCost(Instruction::Select, Ty, CondTy,
1267 3 * getScalarizationOverhead(Ty, /*Insert=*/false,