Lines Matching refs:DL

162                           const DataLayout &DL);
164 const DataLayout &DL);
267 const DataLayout &DL; member in __anonfbe388980211::ConvertToScalarInfo
310 explicit ConvertToScalarInfo(unsigned Size, const DataLayout &DL, in ConvertToScalarInfo() argument
312 : AllocaSize(Size), DL(DL), ScalarLoadThreshold(SLT), IsNotTrivial(false), in ConvertToScalarInfo()
373 !HadNonMemTransferAccess && !DL.fitsInLegalInteger(BitWidth)) in TryConvert()
530 uint64_t GEPOffset = DL.getIndexedOffset(PtrTy, in CanConvertToScalar()
625 uint64_t GEPOffset = DL.getIndexedOffset(GEP->getPointerOperandType(), in ConvertUsesToScalar()
702 AllocaInst *OrigAI = cast<AllocaInst>(GetUnderlyingObject(Ptr, DL, 0)); in ConvertUsesToScalar()
704 if (GetUnderlyingObject(MTI->getSource(), DL, 0) != OrigAI) { in ConvertUsesToScalar()
720 } else if (GetUnderlyingObject(MTI->getDest(), DL, 0) != OrigAI) { in ConvertUsesToScalar()
780 unsigned FromTypeSize = DL.getTypeAllocSize(FromType); in ConvertScalar_ExtractValue()
781 unsigned ToTypeSize = DL.getTypeAllocSize(ToType); in ConvertScalar_ExtractValue()
788 unsigned EltSize = DL.getTypeAllocSizeInBits(VTy->getElementType()); in ConvertScalar_ExtractValue()
814 const StructLayout &Layout = *DL.getStructLayout(ST); in ConvertScalar_ExtractValue()
828 uint64_t EltSize = DL.getTypeAllocSizeInBits(AT->getElementType()); in ConvertScalar_ExtractValue()
845 if (DL.isBigEndian()) { in ConvertScalar_ExtractValue()
849 ShAmt = DL.getTypeStoreSizeInBits(NTy) - in ConvertScalar_ExtractValue()
850 DL.getTypeStoreSizeInBits(ToType) - Offset; in ConvertScalar_ExtractValue()
866 unsigned LIBitWidth = DL.getTypeSizeInBits(ToType); in ConvertScalar_ExtractValue()
913 uint64_t VecSize = DL.getTypeAllocSizeInBits(VTy); in ConvertScalar_InsertValue()
914 uint64_t ValSize = DL.getTypeAllocSizeInBits(SV->getType()); in ConvertScalar_InsertValue()
925 uint64_t EltSize = DL.getTypeAllocSizeInBits(EltTy); in ConvertScalar_InsertValue()
944 const StructLayout &Layout = *DL.getStructLayout(ST); in ConvertScalar_InsertValue()
957 uint64_t EltSize = DL.getTypeAllocSizeInBits(AT->getElementType()); in ConvertScalar_InsertValue()
968 unsigned SrcWidth = DL.getTypeSizeInBits(SV->getType()); in ConvertScalar_InsertValue()
969 unsigned DestWidth = DL.getTypeSizeInBits(AllocaType); in ConvertScalar_InsertValue()
970 unsigned SrcStoreWidth = DL.getTypeStoreSizeInBits(SV->getType()); in ConvertScalar_InsertValue()
971 unsigned DestStoreWidth = DL.getTypeStoreSizeInBits(AllocaType); in ConvertScalar_InsertValue()
975 SV = Builder.CreatePtrToInt(SV, DL.getIntPtrType(SV->getType())); in ConvertScalar_InsertValue()
994 if (DL.isBigEndian()) { in ConvertScalar_InsertValue()
1142 const DataLayout &DL = SI->getModule()->getDataLayout(); in isSafeSelectToSpeculate() local
1143 bool TDerefable = SI->getTrueValue()->isDereferenceablePointer(DL); in isSafeSelectToSpeculate()
1144 bool FDerefable = SI->getFalseValue()->isDereferenceablePointer(DL); in isSafeSelectToSpeculate()
1205 const DataLayout &DL = PN->getModule()->getDataLayout(); in isSafePHIToSpeculate() local
1231 if (InVal->isDereferenceablePointer(DL) || in isSafePHIToSpeculate()
1246 static bool tryToMakeAllocaBePromotable(AllocaInst *AI, const DataLayout &DL) { in tryToMakeAllocaBePromotable() argument
1272 return tryToMakeAllocaBePromotable(AI, DL); in tryToMakeAllocaBePromotable()
1414 const DataLayout &DL = F.getParent()->getDataLayout(); in performPromotion() local
1432 if (tryToMakeAllocaBePromotable(AI, DL)) in performPromotion()
1478 const DataLayout &DL = F.getParent()->getDataLayout(); in performScalarRepl() local
1508 uint64_t AllocaSize = DL.getTypeAllocSize(AI->getAllocatedType()); in performScalarRepl()
1532 ConvertToScalarInfo((unsigned)AllocaSize, DL, ScalarLoadThreshold) in performScalarRepl()
1611 const DataLayout &DL = I->getModule()->getDataLayout(); in isSafeForScalarRepl() local
1634 isSafeMemAccess(Offset, DL.getTypeAllocSize(LIType), LIType, false, Info, in isSafeForScalarRepl()
1644 isSafeMemAccess(Offset, DL.getTypeAllocSize(SIType), SIType, true, Info, in isSafeForScalarRepl()
1677 const DataLayout &DL = I->getModule()->getDataLayout(); in isSafePHISelectUseForScalarRepl() local
1694 isSafeMemAccess(Offset, DL.getTypeAllocSize(LIType), LIType, false, Info, in isSafePHISelectUseForScalarRepl()
1704 isSafeMemAccess(Offset, DL.getTypeAllocSize(SIType), SIType, true, Info, in isSafePHISelectUseForScalarRepl()
1750 const DataLayout &DL = GEPI->getModule()->getDataLayout(); in isSafeGEP() local
1751 Offset += DL.getIndexedOffset(GEPI->getPointerOperandType(), Indices); in isSafeGEP()
1753 DL)) in isSafeGEP()
1808 const DataLayout &DL = TheAccess->getModule()->getDataLayout(); in isSafeMemAccess() local
1811 MemSize == DL.getTypeAllocSize(Info.AI->getAllocatedType())) { in isSafeMemAccess()
1834 if (TypeHasComponent(T, Offset, MemSize, DL)) { in isSafeMemAccess()
1845 const DataLayout &DL) { in TypeHasComponent() argument
1849 const StructLayout *Layout = DL.getStructLayout(ST); in TypeHasComponent()
1852 EltSize = DL.getTypeAllocSize(EltTy); in TypeHasComponent()
1856 EltSize = DL.getTypeAllocSize(EltTy); in TypeHasComponent()
1862 EltSize = DL.getTypeAllocSize(EltTy); in TypeHasComponent()
1874 return TypeHasComponent(EltTy, Offset, Size, DL); in TypeHasComponent()
1883 const DataLayout &DL = I->getModule()->getDataLayout(); in RewriteForScalarRepl() local
1901 if (Offset == 0 && MemSize == DL.getTypeAllocSize(AI->getAllocatedType())) in RewriteForScalarRepl()
1937 DL.getTypeAllocSize(LIType) == in RewriteForScalarRepl()
1938 DL.getTypeAllocSize(AI->getAllocatedType())) { in RewriteForScalarRepl()
1964 DL.getTypeAllocSize(SIType) == in RewriteForScalarRepl()
1965 DL.getTypeAllocSize(AI->getAllocatedType())) { in RewriteForScalarRepl()
2025 const DataLayout &DL) { in FindElementAndOffset() argument
2029 const StructLayout *Layout = DL.getStructLayout(ST); in FindElementAndOffset()
2037 uint64_t EltSize = DL.getTypeAllocSize(T); in FindElementAndOffset()
2045 uint64_t EltSize = DL.getTypeAllocSize(T); in FindElementAndOffset()
2058 const DataLayout &DL = GEPI->getModule()->getDataLayout(); in RewriteGEP() local
2067 Offset += DL.getIndexedOffset(GEPI->getPointerOperandType(), Indices); in RewriteGEP()
2073 uint64_t OldIdx = FindElementAndOffset(T, OldOffset, IdxTy, DL); in RewriteGEP()
2079 uint64_t Idx = FindElementAndOffset(T, EltOffset, IdxTy, DL); in RewriteGEP()
2090 uint64_t EltIdx = FindElementAndOffset(T, EltOffset, IdxTy, DL); in RewriteGEP()
2124 const DataLayout &DL = II->getModule()->getDataLayout(); in RewriteLifetimeIntrinsic() local
2127 uint64_t Idx = FindElementAndOffset(AIType, NewOffset, IdxTy, DL); in RewriteLifetimeIntrinsic()
2140 uint64_t EltSize = DL.getTypeAllocSize(IdxTy) - NewOffset; in RewriteLifetimeIntrinsic()
2156 uint64_t EltSize = DL.getTypeAllocSize(IdxTy); in RewriteLifetimeIntrinsic()
2232 const DataLayout &DL = MI->getModule()->getDataLayout(); in RewriteMemIntrinUserOfAlloca() local
2249 EltOffset = DL.getStructLayout(ST)->getElementOffset(i); in RewriteMemIntrinUserOfAlloca()
2252 EltOffset = DL.getTypeAllocSize(EltTy) * i; in RewriteMemIntrinUserOfAlloca()
2293 unsigned EltSize = DL.getTypeSizeInBits(ValTy); in RewriteMemIntrinUserOfAlloca()
2323 unsigned EltSize = DL.getTypeAllocSize(EltTy); in RewriteMemIntrinUserOfAlloca()
2357 const DataLayout &DL = SI->getModule()->getDataLayout(); in RewriteStoreUserOfWholeAlloca() local
2358 uint64_t AllocaSizeBits = DL.getTypeAllocSizeInBits(AllocaEltTy); in RewriteStoreUserOfWholeAlloca()
2363 if (DL.getTypeSizeInBits(SrcVal->getType()) != AllocaSizeBits) in RewriteStoreUserOfWholeAlloca()
2373 const StructLayout *Layout = DL.getStructLayout(EltSTy); in RewriteStoreUserOfWholeAlloca()
2380 if (DL.isBigEndian()) in RewriteStoreUserOfWholeAlloca()
2381 Shift = AllocaSizeBits - Shift - DL.getTypeAllocSizeInBits(FieldTy); in RewriteStoreUserOfWholeAlloca()
2390 uint64_t FieldSizeBits = DL.getTypeSizeInBits(FieldTy); in RewriteStoreUserOfWholeAlloca()
2415 uint64_t ElementOffset = DL.getTypeAllocSizeInBits(ArrayEltTy); in RewriteStoreUserOfWholeAlloca()
2416 uint64_t ElementSizeBits = DL.getTypeSizeInBits(ArrayEltTy); in RewriteStoreUserOfWholeAlloca()
2420 if (DL.isBigEndian()) in RewriteStoreUserOfWholeAlloca()
2454 if (DL.isBigEndian()) in RewriteStoreUserOfWholeAlloca()
2472 const DataLayout &DL = LI->getModule()->getDataLayout(); in RewriteLoadUserOfWholeAlloca() local
2473 uint64_t AllocaSizeBits = DL.getTypeAllocSizeInBits(AllocaEltTy); in RewriteLoadUserOfWholeAlloca()
2483 Layout = DL.getStructLayout(EltSTy); in RewriteLoadUserOfWholeAlloca()
2486 ArrayEltBitOffset = DL.getTypeAllocSizeInBits(ArrayEltTy); in RewriteLoadUserOfWholeAlloca()
2498 uint64_t FieldSizeBits = DL.getTypeSizeInBits(FieldTy); in RewriteLoadUserOfWholeAlloca()
2529 if (DL.isBigEndian()) in RewriteLoadUserOfWholeAlloca()
2546 if (DL.getTypeSizeInBits(LI->getType()) != AllocaSizeBits) in RewriteLoadUserOfWholeAlloca()
2556 static bool HasPadding(Type *Ty, const DataLayout &DL) { in HasPadding() argument
2559 return DL.getTypeSizeInBits(Ty) != DL.getTypeAllocSizeInBits(Ty); in HasPadding()
2564 const StructLayout *SL = DL.getStructLayout(STy); in HasPadding()
2573 PrevFieldBitOffset+DL.getTypeSizeInBits(STy->getElementType(i-1)); in HasPadding()
2582 DL.getTypeSizeInBits(STy->getElementType(EltCount-1)); in HasPadding()
2603 const DataLayout &DL = AI->getModule()->getDataLayout(); in isSafeAllocaToScalarRepl() local
2611 HasPadding(AI->getAllocatedType(), DL)) in isSafeAllocaToScalarRepl()