Lines Matching refs:Ty

49     Type *Ty = ST->getElementType(i);
50 unsigned TyAlign = ST->isPacked() ? 1 : DL.getABITypeAlignment(Ty);
62 StructSize += DL.getTypeAllocSize(Ty); // Consume space for this data item
459 Type *Ty) const {
493 unsigned Align = getTypeAllocSize(cast<VectorType>(Ty)->getElementType());
494 Align *= cast<VectorType>(Ty)->getNumElements();
510 unsigned Align = getTypeStoreSize(Ty);
556 const StructLayout *DataLayout::getStructLayout(StructType *Ty) const {
561 StructLayout *&SL = (*STM)[Ty];
566 int NumElts = Ty->getNumElements();
574 new (L) StructLayout(Ty, *this);
607 unsigned DataLayout::getPointerTypeSizeInBits(Type *Ty) const {
608 assert(Ty->isPtrOrPtrVectorTy() &&
611 if (Ty->isPointerTy())
612 return getTypeSizeInBits(Ty);
614 return getTypeSizeInBits(Ty->getScalarType());
620 \param Ty The underlying type for which alignment is determined.
623 == false) for the requested type \a Ty.
625 unsigned DataLayout::getAlignment(Type *Ty, bool abi_or_pref) const {
628 assert(Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!");
629 switch (Ty->getTypeID()) {
636 unsigned AS = cast<PointerType>(Ty)->getAddressSpace();
642 return getAlignment(cast<ArrayType>(Ty)->getElementType(), abi_or_pref);
646 if (cast<StructType>(Ty)->isPacked() && abi_or_pref)
650 const StructLayout *Layout = getStructLayout(cast<StructType>(Ty));
651 unsigned Align = getAlignmentInfo(AGGREGATE_ALIGN, 0, abi_or_pref, Ty);
675 return getAlignmentInfo((AlignTypeEnum)AlignType, getTypeSizeInBits(Ty),
676 abi_or_pref, Ty);
679 unsigned DataLayout::getABITypeAlignment(Type *Ty) const {
680 return getAlignment(Ty, true);
689 unsigned DataLayout::getPrefTypeAlignment(Type *Ty) const {
690 return getAlignment(Ty, false);
693 unsigned DataLayout::getPreferredTypeAlignmentShift(Type *Ty) const {
694 unsigned Align = getPrefTypeAlignment(Ty);
704 Type *DataLayout::getIntPtrType(Type *Ty) const {
705 assert(Ty->isPtrOrPtrVectorTy() &&
707 unsigned NumBits = getPointerTypeSizeInBits(Ty);
708 IntegerType *IntTy = IntegerType::get(Ty->getContext(), NumBits);
709 if (VectorType *VecTy = dyn_cast<VectorType>(Ty))
728 Type *Ty = ptrTy;
729 assert(Ty->isPointerTy() && "Illegal argument for getIndexedOffset()");
748 // Update Ty to refer to current element
749 Ty = STy->getElementType(FieldNo);
751 // Update Ty to refer to current element
752 Ty = cast<SequentialType>(Ty)->getElementType();
756 Result += (uint64_t)arrayIdx * getTypeAllocSize(Ty);