Lines Matching refs:Ty

52     Type *Ty = ST->getElementType(i);
53 unsigned TyAlign = ST->isPacked() ? 1 : TD.getABITypeAlignment(Ty);
63 StructSize += TD.getTypeAllocSize(Ty); // Consume space for this data item
335 Type *Ty) const {
371 unsigned Align = getTypeAllocSize(cast<VectorType>(Ty)->getElementType());
372 Align *= cast<VectorType>(Ty)->getNumElements();
417 const StructLayout *TargetData::getStructLayout(StructType *Ty) const {
422 StructLayout *&SL = (*STM)[Ty];
427 int NumElts = Ty->getNumElements();
435 new (L) StructLayout(Ty, *this);
465 uint64_t TargetData::getTypeSizeInBits(Type *Ty) const {
466 assert(Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!");
467 switch (Ty->getTypeID()) {
472 ArrayType *ATy = cast<ArrayType>(Ty);
477 return getStructLayout(cast<StructType>(Ty))->getSizeInBits();
479 return cast<IntegerType>(Ty)->getBitWidth();
497 return cast<VectorType>(Ty)->getBitWidth();
506 \param Ty The underlying type for which alignment is determined.
509 == false) for the requested type \a Ty.
511 unsigned TargetData::getAlignment(Type *Ty, bool abi_or_pref) const {
514 assert(Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!");
515 switch (Ty->getTypeID()) {
523 return getAlignment(cast<ArrayType>(Ty)->getElementType(), abi_or_pref);
527 if (cast<StructType>(Ty)->isPacked() && abi_or_pref)
531 const StructLayout *Layout = getStructLayout(cast<StructType>(Ty));
532 unsigned Align = getAlignmentInfo(AGGREGATE_ALIGN, 0, abi_or_pref, Ty);
557 return getAlignmentInfo((AlignTypeEnum)AlignType, getTypeSizeInBits(Ty),
558 abi_or_pref, Ty);
561 unsigned TargetData::getABITypeAlignment(Type *Ty) const {
562 return getAlignment(Ty, true);
572 unsigned TargetData::getCallFrameTypeAlignment(Type *Ty) const {
577 return getABITypeAlignment(Ty);
580 unsigned TargetData::getPrefTypeAlignment(Type *Ty) const {
581 return getAlignment(Ty, false);
584 unsigned TargetData::getPreferredTypeAlignmentShift(Type *Ty) const {
585 unsigned Align = getPrefTypeAlignment(Ty);
599 Type *Ty = ptrTy;
600 assert(Ty->isPointerTy() && "Illegal argument for getIndexedOffset()");
619 // Update Ty to refer to current element
620 Ty = STy->getElementType(FieldNo);
622 // Update Ty to refer to current element
623 Ty = cast<SequentialType>(Ty)->getElementType();
627 Result += (uint64_t)arrayIdx * getTypeAllocSize(Ty);