Lines Matching refs:Ty

53     Type *Ty = ST->getElementType(i);
54 unsigned TyAlign = ST->isPacked() ? 1 : DL.getABITypeAlignment(Ty);
64 StructSize += DL.getTypeAllocSize(Ty); // Consume space for this data item
412 Type *Ty) const {
448 unsigned Align = getTypeAllocSize(cast<VectorType>(Ty)->getElementType());
449 Align *= cast<VectorType>(Ty)->getNumElements();
498 const StructLayout *DataLayout::getStructLayout(StructType *Ty) const {
503 StructLayout *&SL = (*STM)[Ty];
508 int NumElts = Ty->getNumElements();
516 new (L) StructLayout(Ty, *this);
611 unsigned DataLayout::getPointerTypeSizeInBits(Type *Ty) const {
612 assert(Ty->isPtrOrPtrVectorTy() &&
615 if (Ty->isPointerTy())
616 return getTypeSizeInBits(Ty);
618 return getTypeSizeInBits(Ty->getScalarType());
624 \param Ty The underlying type for which alignment is determined.
627 == false) for the requested type \a Ty.
629 unsigned DataLayout::getAlignment(Type *Ty, bool abi_or_pref) const {
632 assert(Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!");
633 switch (Ty->getTypeID()) {
640 unsigned AS = dyn_cast<PointerType>(Ty)->getAddressSpace();
646 return getAlignment(cast<ArrayType>(Ty)->getElementType(), abi_or_pref);
650 if (cast<StructType>(Ty)->isPacked() && abi_or_pref)
654 const StructLayout *Layout = getStructLayout(cast<StructType>(Ty));
655 unsigned Align = getAlignmentInfo(AGGREGATE_ALIGN, 0, abi_or_pref, Ty);
679 return getAlignmentInfo((AlignTypeEnum)AlignType, getTypeSizeInBits(Ty),
680 abi_or_pref, Ty);
683 unsigned DataLayout::getABITypeAlignment(Type *Ty) const {
684 return getAlignment(Ty, true);
693 unsigned DataLayout::getPrefTypeAlignment(Type *Ty) const {
694 return getAlignment(Ty, false);
697 unsigned DataLayout::getPreferredTypeAlignmentShift(Type *Ty) const {
698 unsigned Align = getPrefTypeAlignment(Ty);
708 Type *DataLayout::getIntPtrType(Type *Ty) const {
709 assert(Ty->isPtrOrPtrVectorTy() &&
711 unsigned NumBits = getPointerTypeSizeInBits(Ty);
712 IntegerType *IntTy = IntegerType::get(Ty->getContext(), NumBits);
713 if (VectorType *VecTy = dyn_cast<VectorType>(Ty))
732 Type *Ty = ptrTy;
733 assert(Ty->isPointerTy() && "Illegal argument for getIndexedOffset()");
752 // Update Ty to refer to current element
753 Ty = STy->getElementType(FieldNo);
755 // Update Ty to refer to current element
756 Ty = cast<SequentialType>(Ty)->getElementType();
760 Result += (uint64_t)arrayIdx * getTypeAllocSize(Ty);