Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:Ty

65     if (llvm::Type *Ty = getCoerceToType())
66 Ty->print(OS);
258 static bool is32Or64BitBasicType(QualType Ty, ASTContext &Context) {
259 if (!Ty->getAs<BuiltinType>() && !Ty->hasPointerRepresentation() &&
260 !Ty->isAnyComplexType() && !Ty->isEnumeralType() &&
261 !Ty->isBlockPointerType())
264 uint64_t Size = Context.getTypeSize(Ty);
277 static bool canExpandIndirectArgument(QualType Ty, ASTContext &Context) {
279 const RecordType *RT = Ty->getAs<RecordType>();
326 virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
336 llvm::Value *DefaultABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
341 ABIArgInfo DefaultABIInfo::classifyArgumentType(QualType Ty) const {
342 if (isAggregateTypeForABI(Ty))
346 if (const EnumType *EnumTy = Ty->getAs<EnumType>())
347 Ty = EnumTy->getDecl()->getIntegerType();
349 return (Ty->isPromotableIntegerType() ?
380 llvm::Type* Ty) {
381 if ((Constraint == "y" || Constraint == "&y") && Ty->isVectorTy())
383 return Ty;
402 static bool shouldReturnTypeInRegister(QualType Ty, ASTContext &Context);
404 /// getIndirectResult - Give a source type \arg Ty, return a suitable result
406 ABIArgInfo getIndirectResult(QualType Ty, bool ByVal = true) const;
409 unsigned getTypeStackAlignInBytes(QualType Ty, unsigned Align) const;
423 virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
451 llvm::Type* Ty) const {
452 return X86AdjustInlineAsmType(CGF, Constraint, Ty);
461 bool X86_32ABIInfo::shouldReturnTypeInRegister(QualType Ty,
463 uint64_t Size = Context.getTypeSize(Ty);
469 if (Ty->isVectorType()) {
480 if (Ty->getAs<BuiltinType>() || Ty->hasPointerRepresentation() ||
481 Ty->isAnyComplexType() || Ty->isEnumeralType() ||
482 Ty->isBlockPointerType() || Ty->isMemberPointerType())
486 if (const ConstantArrayType *AT = Context.getAsConstantArrayType(Ty))
490 const RecordType *RT = Ty->getAs<RecordType>();
617 static bool isRecordWithSSEVectorType(ASTContext &Context, QualType Ty) {
618 const RecordType *RT = Ty->getAs<RecordType>();
634 if (FT->getAs<VectorType>() && Context.getTypeSize(Ty) == 128)
644 unsigned X86_32ABIInfo::getTypeStackAlignInBytes(QualType Ty,
658 if (isRecordWithSSEVectorType(getContext(), Ty))
664 ABIArgInfo X86_32ABIInfo::getIndirectResult(QualType Ty, bool ByVal) const {
669 unsigned TypeAlign = getContext().getTypeAlign(Ty) / 8;
670 unsigned StackAlign = getTypeStackAlignInBytes(Ty, TypeAlign);
683 ABIArgInfo X86_32ABIInfo::classifyArgumentType(QualType Ty) const {
685 if (isAggregateTypeForABI(Ty)) {
687 if (const RecordType *RT = Ty->getAs<RecordType>()) {
691 return getIndirectResult(Ty, /*ByVal=*/false);
694 return getIndirectResult(Ty);
698 if (Ty->isStructureType() && getContext().getTypeSize(Ty) == 0)
705 if (getContext().getTypeSize(Ty) <= 4*32 &&
706 canExpandIndirectArgument(Ty, getContext()))
709 return getIndirectResult(Ty);
712 if (const VectorType *VT = Ty->getAs<VectorType>()) {
716 uint64_t Size = getContext().getTypeSize(Ty);
723 llvm::Type *IRType = CGT.ConvertType(Ty);
737 if (const EnumType *EnumTy = Ty->getAs<EnumType>())
738 Ty = EnumTy->getDecl()->getIntegerType();
740 return (Ty->isPromotableIntegerType() ?
744 llvm::Value *X86_32ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
754 llvm::PointerType::getUnqual(CGF.ConvertType(Ty));
758 llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, 4);
886 llvm::Type *GetByteVectorType(QualType Ty) const;
894 /// getIndirectResult - Give a source type \arg Ty, return a suitable result
896 ABIArgInfo getIndirectReturnResult(QualType Ty) const;
898 /// getIndirectResult - Give a source type \arg Ty, return a suitable result
900 ABIArgInfo getIndirectResult(QualType Ty) const;
904 ABIArgInfo classifyArgumentType(QualType Ty,
922 virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
929 ABIArgInfo classify(QualType Ty) const;
936 virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
966 llvm::Type* Ty) const {
967 return X86AdjustInlineAsmType(CGF, Constraint, Ty);
1081 void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase,
1096 if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) {
1117 if (const EnumType *ET = Ty->getAs<EnumType>()) {
1123 if (Ty->hasPointerRepresentation()) {
1128 if (Ty->isMemberPointerType()) {
1129 if (Ty->isMemberFunctionPointerType())
1136 if (const VectorType *VT = Ty->getAs<VectorType>()) {
1181 if (const ComplexType *CT = Ty->getAs<ComplexType>()) {
1184 uint64_t Size = getContext().getTypeSize(Ty);
1207 if (const ConstantArrayType *AT = getContext().getAsConstantArrayType(Ty)) {
1210 uint64_t Size = getContext().getTypeSize(Ty);
1250 if (const RecordType *RT = Ty->getAs<RecordType>()) {
1251 uint64_t Size = getContext().getTypeSize(Ty);
1365 ABIArgInfo X86_64ABIInfo::getIndirectReturnResult(QualType Ty) const {
1368 if (!isAggregateTypeForABI(Ty)) {
1370 if (const EnumType *EnumTy = Ty->getAs<EnumType>())
1371 Ty = EnumTy->getDecl()->getIntegerType();
1373 return (Ty->isPromotableIntegerType() ?
1380 ABIArgInfo X86_64ABIInfo::getIndirectResult(QualType Ty) const {
1383 if (!isAggregateTypeForABI(Ty)) {
1385 if (const EnumType *EnumTy = Ty->getAs<EnumType>())
1386 Ty = EnumTy->getDecl()->getIntegerType();
1388 return (Ty->isPromotableIntegerType() ?
1392 if (isRecordWithNonTrivialDestructorOrCopyConstructor(Ty))
1397 Ty) / 8, 8U);
1404 llvm::Type *X86_64ABIInfo::GetByteVectorType(QualType Ty) const {
1405 llvm::Type *IRType = CGT.ConvertType(Ty);
1437 static bool BitsContainNoUserData(QualType Ty, unsigned StartBit,
1442 unsigned TySize = (unsigned)Context.getTypeSize(Ty);
1446 if (const ConstantArrayType *AT = Context.getAsConstantArrayType(Ty)) {
1465 if (const RecordType *RT = Ty->getAs<RecordType>()) {
1813 ABIArgInfo X86_64ABIInfo::classifyArgumentType(QualType Ty, unsigned &neededInt,
1816 classify(Ty, 0, Lo, Hi);
1844 if (isRecordWithNonTrivialDestructorOrCopyConstructor(Ty))
1846 return getIndirectResult(Ty);
1859 ResType = GetINTEGERTypeAtOffset(CGT.ConvertType(Ty), 0, Ty, 0);
1865 if (const EnumType *EnumTy = Ty->getAs<EnumType>())
1866 Ty = EnumTy->getDecl()->getIntegerType();
1868 if (Ty->isIntegralOrEnumerationType() &&
1869 Ty->isPromotableIntegerType())
1879 llvm::Type *IRType = CGT.ConvertType(Ty);
1880 ResType = GetSSETypeAtOffset(IRType, 0, Ty, 0);
1901 HighPart = GetINTEGERTypeAtOffset(CGT.ConvertType(Ty), 8, Ty, 8);
1911 HighPart = GetSSETypeAtOffset(CGT.ConvertType(Ty), 8, Ty, 8);
1924 ResType = GetByteVectorType(Ty);
1970 QualType Ty,
1979 uint64_t Align = CGF.getContext().getTypeAlign(Ty) / 8;
1999 llvm::Type *LTy = CGF.ConvertTypeForMem(Ty);
2009 uint64_t SizeInBytes = (CGF.getContext().getTypeSize(Ty) + 7) / 8;
2020 llvm::Value *X86_64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2033 Ty = CGF.getContext().getCanonicalType(Ty);
2034 ABIArgInfo AI = classifyArgumentType(Ty, neededInt, neededSSE);
2039 return EmitVAArgFromMemory(VAListAddr, Ty, CGF);
2090 llvm::Type *LTy = CGF.ConvertTypeForMem(Ty);
2166 llvm::Value *MemAddr = EmitVAArgFromMemory(VAListAddr, Ty, CGF);
2178 ABIArgInfo WinX86_64ABIInfo::classify(QualType Ty) const {
2180 if (Ty->isVoidType())
2183 if (const EnumType *EnumTy = Ty->getAs<EnumType>())
2184 Ty = EnumTy->getDecl()->getIntegerType();
2186 uint64_t Size = getContext().getTypeSize(Ty);
2188 if (const RecordType *RT = Ty->getAs<RecordType>()) {
2209 if (Ty->isPromotableIntegerType())
2225 llvm::Value *WinX86_64ABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2235 llvm::PointerType::getUnqual(CGF.ConvertType(Ty));
2239 llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, 8);
2342 virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2425 static bool isHomogeneousAggregate(QualType Ty, const Type *&Base,
2429 if (const ConstantArrayType *AT = Context.getAsConstantArrayType(Ty)) {
2433 } else if (const RecordType *RT = Ty->getAs<RecordType>()) {
2452 if (const ComplexType *CT = Ty->getAs<ComplexType>()) {
2454 Ty = CT->getElementType();
2459 if (const BuiltinType *BT = Ty->getAs<BuiltinType>()) {
2463 } else if (const VectorType *VT = Ty->getAs<VectorType>()) {
2473 const Type *TyPtr = Ty.getTypePtr();
2488 ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty) const {
2489 if (!isAggregateTypeForABI(Ty)) {
2491 if (const EnumType *EnumTy = Ty->getAs<EnumType>())
2492 Ty = EnumTy->getDecl()->getIntegerType();
2494 return (Ty->isPromotableIntegerType() ?
2499 if (isEmptyRecord(getContext(), Ty, true))
2504 if (isRecordWithNonTrivialDestructorOrCopyConstructor(Ty))
2510 if (isHomogeneousAggregate(Ty, Base, getContext()))
2521 if (getContext().getTypeAlign(Ty) > 32) {
2523 SizeRegs = (getContext().getTypeSize(Ty) + 63) / 64;
2526 SizeRegs = (getContext().getTypeSize(Ty) + 31) / 32;
2534 static bool isIntegerLikeType(QualType Ty, ASTContext &Context,
2540 uint64_t Size = Context.getTypeSize(Ty);
2547 if (Ty->isVectorType())
2551 if (Ty->isRealFloatingType())
2555 if (Ty->getAs<BuiltinType>() || Ty->isPointerType())
2559 if (const ComplexType *CT = Ty->getAs<ComplexType>())
2566 const RecordType *RT = Ty->getAs<RecordType>();
2689 llvm::Value *ARMABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2699 uint64_t TyAlign = CGF.getContext().getTypeAlign(Ty) / 8;
2709 llvm::PointerType::getUnqual(CGF.ConvertType(Ty));
2713 llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, 4);
2733 ABIArgInfo classifyArgumentType(QualType Ty) const;
2736 virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2757 ABIArgInfo PTXABIInfo::classifyArgumentType(QualType Ty) const {
2758 if (isAggregateTypeForABI(Ty))
2793 llvm::Value *PTXABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2841 bool isPromotableIntegerType(QualType Ty) const;
2853 virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2865 bool SystemZABIInfo::isPromotableIntegerType(QualType Ty) const {
2867 if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
2885 llvm::Value *SystemZABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2902 ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const {
2903 if (isAggregateTypeForABI(Ty))
2906 return (isPromotableIntegerType(Ty) ?
2920 bool isPromotableIntegerType(QualType Ty) const;
2932 virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2946 bool MBlazeABIInfo::isPromotableIntegerType(QualType Ty) const {
2948 if (const BuiltinType *BT = Ty->getAs<BuiltinType>())
2964 llvm::Value *MBlazeABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
2981 ABIArgInfo MBlazeABIInfo::classifyArgumentType(QualType Ty) const {
2982 if (isAggregateTypeForABI(Ty))
2985 return (isPromotableIntegerType(Ty) ?
3073 virtual llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
3098 ABIArgInfo MipsABIInfo::classifyArgumentType(QualType Ty) const {
3099 if (isAggregateTypeForABI(Ty)) {
3101 if (getContext().getTypeSize(Ty) == 0)
3106 if (isRecordWithNonTrivialDestructorOrCopyConstructor(Ty))
3113 if (const EnumType *EnumTy = Ty->getAs<EnumType>())
3114 Ty = EnumTy->getDecl()->getIntegerType();
3116 return (Ty->isPromotableIntegerType() ?
3146 llvm::Value* MipsABIInfo::EmitVAArg(llvm::Value *VAListAddr, QualType Ty,
3154 unsigned TypeAlign = getContext().getTypeAlign(Ty) / 8;
3155 llvm::Type *PTy = llvm::PointerType::getUnqual(CGF.ConvertType(Ty));
3172 llvm::RoundUpToAlignment(CGF.getContext().getTypeSize(Ty) / 8, TypeAlign);