Lines Matching refs:Ty

52     Type *Ty = ST->getElementType(i);
53 unsigned TyAlign = ST->isPacked() ? 1 : DL.getABITypeAlignment(Ty);
63 StructSize += DL.getTypeAllocSize(Ty); // Consume space for this data item
357 Type *Ty) const {
393 unsigned Align = getTypeAllocSize(cast<VectorType>(Ty)->getElementType());
394 Align *= cast<VectorType>(Ty)->getNumElements();
445 const StructLayout *DataLayout::getStructLayout(StructType *Ty) const {
450 StructLayout *&SL = (*STM)[Ty];
455 int NumElts = Ty->getNumElements();
463 new (L) StructLayout(Ty, *this);
510 unsigned DataLayout::getPointerTypeSizeInBits(Type *Ty) const {
511 assert(Ty->isPtrOrPtrVectorTy() &&
514 if (Ty->isPointerTy())
515 return getTypeSizeInBits(Ty);
517 return getTypeSizeInBits(Ty->getScalarType());
523 \param Ty The underlying type for which alignment is determined.
526 == false) for the requested type \a Ty.
528 unsigned DataLayout::getAlignment(Type *Ty, bool abi_or_pref) const {
531 assert(Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!");
532 switch (Ty->getTypeID()) {
539 unsigned AS = dyn_cast<PointerType>(Ty)->getAddressSpace();
545 return getAlignment(cast<ArrayType>(Ty)->getElementType(), abi_or_pref);
549 if (cast<StructType>(Ty)->isPacked() && abi_or_pref)
553 const StructLayout *Layout = getStructLayout(cast<StructType>(Ty));
554 unsigned Align = getAlignmentInfo(AGGREGATE_ALIGN, 0, abi_or_pref, Ty);
578 return getAlignmentInfo((AlignTypeEnum)AlignType, getTypeSizeInBits(Ty),
579 abi_or_pref, Ty);
582 unsigned DataLayout::getABITypeAlignment(Type *Ty) const {
583 return getAlignment(Ty, true);
592 unsigned DataLayout::getCallFrameTypeAlignment(Type *Ty) const {
597 return getABITypeAlignment(Ty);
600 unsigned DataLayout::getPrefTypeAlignment(Type *Ty) const {
601 return getAlignment(Ty, false);
604 unsigned DataLayout::getPreferredTypeAlignmentShift(Type *Ty) const {
605 unsigned Align = getPrefTypeAlignment(Ty);
615 Type *DataLayout::getIntPtrType(Type *Ty) const {
616 assert(Ty->isPtrOrPtrVectorTy() &&
618 unsigned NumBits = getTypeSizeInBits(Ty->getScalarType());
619 IntegerType *IntTy = IntegerType::get(Ty->getContext(), NumBits);
620 if (VectorType *VecTy = dyn_cast<VectorType>(Ty))
634 Type *Ty = ptrTy;
635 assert(Ty->isPointerTy() && "Illegal argument for getIndexedOffset()");
654 // Update Ty to refer to current element
655 Ty = STy->getElementType(FieldNo);
657 // Update Ty to refer to current element
658 Ty = cast<SequentialType>(Ty)->getElementType();
662 Result += (uint64_t)arrayIdx * getTypeAllocSize(Ty);