Lines Matching refs:DL

72 static unsigned getBitWidth(Type *Ty, const DataLayout &DL) {  in getBitWidth()  argument
76 return DL.getPointerTypeSizeInBits(Ty); in getBitWidth()
128 const DataLayout &DL, unsigned Depth,
132 const DataLayout &DL, unsigned Depth, in computeKnownBits() argument
135 ::computeKnownBits(V, KnownZero, KnownOne, DL, Depth, in computeKnownBits()
140 const DataLayout &DL, unsigned Depth,
144 const DataLayout &DL, unsigned Depth, in ComputeSignBit() argument
147 ::ComputeSignBit(V, KnownZero, KnownOne, DL, Depth, in ComputeSignBit()
152 const Query &Q, const DataLayout &DL);
154 bool llvm::isKnownToBeAPowerOfTwo(Value *V, const DataLayout &DL, bool OrZero, in isKnownToBeAPowerOfTwo() argument
159 Query(AC, safeCxtI(V, CxtI), DT), DL); in isKnownToBeAPowerOfTwo()
162 static bool isKnownNonZero(Value *V, const DataLayout &DL, unsigned Depth,
165 bool llvm::isKnownNonZero(Value *V, const DataLayout &DL, unsigned Depth, in isKnownNonZero() argument
168 return ::isKnownNonZero(V, DL, Depth, Query(AC, safeCxtI(V, CxtI), DT)); in isKnownNonZero()
171 static bool MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL,
174 bool llvm::MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL, in MaskedValueIsZero() argument
177 return ::MaskedValueIsZero(V, Mask, DL, Depth, in MaskedValueIsZero()
181 static unsigned ComputeNumSignBits(Value *V, const DataLayout &DL,
184 unsigned llvm::ComputeNumSignBits(Value *V, const DataLayout &DL, in ComputeNumSignBits() argument
188 return ::ComputeNumSignBits(V, DL, Depth, Query(AC, safeCxtI(V, CxtI), DT)); in ComputeNumSignBits()
194 const DataLayout &DL, unsigned Depth, in computeKnownBitsAddSub() argument
206 computeKnownBits(Op1, KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBitsAddSub()
225 computeKnownBits(Op0, LHSKnownZero, LHSKnownOne, DL, Depth + 1, Q); in computeKnownBitsAddSub()
226 computeKnownBits(Op1, KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBitsAddSub()
274 const DataLayout &DL, unsigned Depth, in computeKnownBitsMul() argument
277 computeKnownBits(Op1, KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBitsMul()
278 computeKnownBits(Op0, KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBitsMul()
299 isKnownNonZero(Op0, DL, Depth, Q)) || in computeKnownBitsMul()
301 isKnownNonZero(Op1, DL, Depth, Q)); in computeKnownBitsMul()
507 const DataLayout &DL, in computeKnownBitsFromTrueCondition() argument
529 computeKnownBits(RHS, KnownZeroTemp, KnownOneTemp, DL, Depth + 1, Q); in computeKnownBitsFromTrueCondition()
538 computeKnownBits(RHS, KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBitsFromTrueCondition()
540 computeKnownBits(LHS, KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBitsFromTrueCondition()
547 computeKnownBits(RHS, KnownZeroTemp, KnownOneTemp, DL, Depth + 1, Q); in computeKnownBitsFromTrueCondition()
556 computeKnownBits(RHS, KnownZeroTemp, KnownOneTemp, DL, Depth + 1, Q); in computeKnownBitsFromTrueCondition()
560 if (isKnownToBeAPowerOfTwo(RHS, false, Depth + 1, Query(Q, Cmp), DL)) in computeKnownBitsFromTrueCondition()
575 const DataLayout &DL, in computeKnownBitsFromDominatingCondition() argument
634 computeKnownBitsFromTrueCondition(V, Cmp, KnownZero, KnownOne, DL, Depth, in computeKnownBitsFromDominatingCondition()
668 computeKnownBitsFromTrueCondition(V, Cmp, KnownZero, KnownOne, DL, Depth, in computeKnownBitsFromDominatingCondition()
675 APInt &KnownOne, const DataLayout &DL, in computeKnownBitsFromAssume() argument
724 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
732 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
734 computeKnownBits(B, MaskKnownZero, MaskKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
745 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
747 computeKnownBits(B, MaskKnownZero, MaskKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
758 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
760 computeKnownBits(B, BKnownZero, BKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
771 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
773 computeKnownBits(B, BKnownZero, BKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
784 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
786 computeKnownBits(B, BKnownZero, BKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
800 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
802 computeKnownBits(B, BKnownZero, BKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
816 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
826 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
838 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
850 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
859 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
869 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
879 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
889 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
899 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
908 computeKnownBits(A, RHSKnownZero, RHSKnownOne, DL, Depth+1, Query(Q, I)); in computeKnownBitsFromAssume()
912 if (isKnownToBeAPowerOfTwo(A, false, Depth + 1, Query(Q, I), DL)) in computeKnownBitsFromAssume()
938 const DataLayout &DL, unsigned Depth, const Query &Q) { in computeKnownBits() argument
946 assert((DL.getTypeSizeInBits(V->getType()->getScalarType()) == BitWidth) && in computeKnownBits()
993 Align = DL.getPreferredAlignment(GVar); in computeKnownBits()
995 Align = DL.getABITypeAlignment(ObjectType); in computeKnownBits()
1015 Align = DL.getABITypeAlignment(EltTy); in computeKnownBits()
1026 computeKnownBitsFromAssume(V, KnownZero, KnownOne, DL, Depth, Q); in computeKnownBits()
1030 computeKnownBitsFromDominatingCondition(V, KnownZero, KnownOne, DL, in computeKnownBits()
1047 computeKnownBits(GA->getAliasee(), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1052 computeKnownBitsFromAssume(V, KnownZero, KnownOne, DL, Depth, Q); in computeKnownBits()
1057 computeKnownBitsFromDominatingCondition(V, KnownZero, KnownOne, DL, Depth, in computeKnownBits()
1072 computeKnownBits(I->getOperand(1), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1073 computeKnownBits(I->getOperand(0), KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBits()
1082 computeKnownBits(I->getOperand(1), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1083 computeKnownBits(I->getOperand(0), KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBits()
1092 computeKnownBits(I->getOperand(1), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1093 computeKnownBits(I->getOperand(0), KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBits()
1105 KnownOne, KnownZero2, KnownOne2, DL, Depth, Q); in computeKnownBits()
1112 computeKnownBits(I->getOperand(0), KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBits()
1117 computeKnownBits(I->getOperand(1), KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBits()
1127 computeKnownBits(I->getOperand(2), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1128 computeKnownBits(I->getOperand(1), KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBits()
1152 SrcBitWidth = DL.getTypeSizeInBits(SrcTy->getScalarType()); in computeKnownBits()
1157 computeKnownBits(I->getOperand(0), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1171 computeKnownBits(I->getOperand(0), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1182 computeKnownBits(I->getOperand(0), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1198 computeKnownBits(I->getOperand(0), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1211 computeKnownBits(I->getOperand(0), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1225 computeKnownBits(I->getOperand(0), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1239 KnownZero, KnownOne, KnownZero2, KnownOne2, DL, in computeKnownBits()
1246 KnownZero, KnownOne, KnownZero2, KnownOne2, DL, in computeKnownBits()
1255 computeKnownBits(I->getOperand(0), KnownZero2, KnownOne2, DL, Depth + 1, in computeKnownBits()
1280 computeKnownBits(I->getOperand(0), LHSKnownZero, LHSKnownOne, DL, in computeKnownBits()
1293 computeKnownBits(I->getOperand(0), KnownZero, KnownOne, DL, Depth + 1, in computeKnownBits()
1303 computeKnownBits(I->getOperand(0), KnownZero, KnownOne, DL, Depth + 1, Q); in computeKnownBits()
1304 computeKnownBits(I->getOperand(1), KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBits()
1317 Align = DL.getABITypeAlignment(AI->getType()->getElementType()); in computeKnownBits()
1327 computeKnownBits(I->getOperand(0), LocalKnownZero, LocalKnownOne, DL, in computeKnownBits()
1346 const StructLayout *SL = DL.getStructLayout(STy); in computeKnownBits()
1358 uint64_t TypeSize = DL.getTypeAllocSize(IndexedTy); in computeKnownBits()
1360 computeKnownBits(Index, LocalKnownZero, LocalKnownOne, DL, Depth + 1, in computeKnownBits()
1403 computeKnownBits(R, KnownZero2, KnownOne2, DL, Depth + 1, Q); in computeKnownBits()
1407 computeKnownBits(L, KnownZero3, KnownOne3, DL, Depth + 1, Q); in computeKnownBits()
1438 computeKnownBits(P->getIncomingValue(i), KnownZero2, KnownOne2, DL, in computeKnownBits()
1491 KnownOne, KnownZero2, KnownOne2, DL, Depth, Q); in computeKnownBits()
1497 KnownOne, KnownZero2, KnownOne2, DL, Depth, Q); in computeKnownBits()
1502 KnownZero, KnownOne, KnownZero2, KnownOne2, DL, in computeKnownBits()
1516 const DataLayout &DL, unsigned Depth, const Query &Q) { in ComputeSignBit() argument
1517 unsigned BitWidth = getBitWidth(V->getType(), DL); in ComputeSignBit()
1525 computeKnownBits(V, ZeroBits, OneBits, DL, Depth, Q); in ComputeSignBit()
1535 const Query &Q, const DataLayout &DL) { in isKnownToBeAPowerOfTwo() argument
1562 return isKnownToBeAPowerOfTwo(X, /*OrZero*/ true, Depth, Q, DL); in isKnownToBeAPowerOfTwo()
1565 return isKnownToBeAPowerOfTwo(ZI->getOperand(0), OrZero, Depth, Q, DL); in isKnownToBeAPowerOfTwo()
1568 return isKnownToBeAPowerOfTwo(SI->getTrueValue(), OrZero, Depth, Q, DL) && in isKnownToBeAPowerOfTwo()
1569 isKnownToBeAPowerOfTwo(SI->getFalseValue(), OrZero, Depth, Q, DL); in isKnownToBeAPowerOfTwo()
1573 if (isKnownToBeAPowerOfTwo(X, /*OrZero*/ true, Depth, Q, DL) || in isKnownToBeAPowerOfTwo()
1574 isKnownToBeAPowerOfTwo(Y, /*OrZero*/ true, Depth, Q, DL)) in isKnownToBeAPowerOfTwo()
1589 if (isKnownToBeAPowerOfTwo(Y, OrZero, Depth, Q, DL)) in isKnownToBeAPowerOfTwo()
1593 if (isKnownToBeAPowerOfTwo(X, OrZero, Depth, Q, DL)) in isKnownToBeAPowerOfTwo()
1598 computeKnownBits(X, LHSZeroBits, LHSOneBits, DL, Depth, Q); in isKnownToBeAPowerOfTwo()
1601 computeKnownBits(Y, RHSZeroBits, RHSOneBits, DL, Depth, Q); in isKnownToBeAPowerOfTwo()
1619 Depth, Q, DL); in isKnownToBeAPowerOfTwo()
1631 static bool isGEPKnownNonNull(GEPOperator *GEP, const DataLayout &DL, in isGEPKnownNonNull() argument
1641 if (isKnownNonZero(GEP->getPointerOperand(), DL, Depth, Q)) in isGEPKnownNonNull()
1653 const StructLayout *SL = DL.getStructLayout(STy); in isGEPKnownNonNull()
1661 if (DL.getTypeAllocSize(GTI.getIndexedType()) == 0) in isGEPKnownNonNull()
1680 if (isKnownNonZero(GTI.getOperand(), DL, Depth, Q)) in isGEPKnownNonNull()
1710 bool isKnownNonZero(Value *V, const DataLayout &DL, unsigned Depth, in isKnownNonZero() argument
1743 if (isGEPKnownNonNull(GEP, DL, Depth, Q)) in isKnownNonZero()
1747 unsigned BitWidth = getBitWidth(V->getType()->getScalarType(), DL); in isKnownNonZero()
1752 return isKnownNonZero(X, DL, Depth, Q) || isKnownNonZero(Y, DL, Depth, Q); in isKnownNonZero()
1756 return isKnownNonZero(cast<Instruction>(V)->getOperand(0), DL, Depth, Q); in isKnownNonZero()
1764 return isKnownNonZero(X, DL, Depth, Q); in isKnownNonZero()
1768 computeKnownBits(X, KnownZero, KnownOne, DL, Depth, Q); in isKnownNonZero()
1778 return isKnownNonZero(X, DL, Depth, Q); in isKnownNonZero()
1781 ComputeSignBit(X, XKnownNonNegative, XKnownNegative, DL, Depth, Q); in isKnownNonZero()
1787 return isKnownNonZero(X, DL, Depth, Q); in isKnownNonZero()
1793 ComputeSignBit(X, XKnownNonNegative, XKnownNegative, DL, Depth, Q); in isKnownNonZero()
1794 ComputeSignBit(Y, YKnownNonNegative, YKnownNegative, DL, Depth, Q); in isKnownNonZero()
1799 if (isKnownNonZero(X, DL, Depth, Q) || isKnownNonZero(Y, DL, Depth, Q)) in isKnownNonZero()
1810 computeKnownBits(X, KnownZero, KnownOne, DL, Depth, Q); in isKnownNonZero()
1815 computeKnownBits(Y, KnownZero, KnownOne, DL, Depth, Q); in isKnownNonZero()
1822 isKnownToBeAPowerOfTwo(Y, /*OrZero*/ false, Depth, Q, DL)) in isKnownNonZero()
1825 isKnownToBeAPowerOfTwo(X, /*OrZero*/ false, Depth, Q, DL)) in isKnownNonZero()
1834 isKnownNonZero(X, DL, Depth, Q) && isKnownNonZero(Y, DL, Depth, Q)) in isKnownNonZero()
1839 if (isKnownNonZero(SI->getTrueValue(), DL, Depth, Q) && in isKnownNonZero()
1840 isKnownNonZero(SI->getFalseValue(), DL, Depth, Q)) in isKnownNonZero()
1847 computeKnownBits(V, KnownZero, KnownOne, DL, Depth, Q); in isKnownNonZero()
1860 bool MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL, in MaskedValueIsZero() argument
1863 computeKnownBits(V, KnownZero, KnownOne, DL, Depth, Q); in MaskedValueIsZero()
1877 unsigned ComputeNumSignBits(Value *V, const DataLayout &DL, unsigned Depth, in ComputeNumSignBits() argument
1879 unsigned TyBits = DL.getTypeSizeInBits(V->getType()->getScalarType()); in ComputeNumSignBits()
1894 return ComputeNumSignBits(U->getOperand(0), DL, Depth + 1, Q) + Tmp; in ComputeNumSignBits()
1906 unsigned NumBits = ComputeNumSignBits(U->getOperand(0), DL, Depth + 1, Q); in ComputeNumSignBits()
1928 ComputeNumSignBits(U->getOperand(0), DL, Depth + 1, Q); in ComputeNumSignBits()
1950 Tmp = ComputeNumSignBits(U->getOperand(0), DL, Depth + 1, Q); in ComputeNumSignBits()
1963 Tmp = ComputeNumSignBits(U->getOperand(0), DL, Depth + 1, Q); in ComputeNumSignBits()
1975 Tmp = ComputeNumSignBits(U->getOperand(0), DL, Depth + 1, Q); in ComputeNumSignBits()
1977 Tmp2 = ComputeNumSignBits(U->getOperand(1), DL, Depth + 1, Q); in ComputeNumSignBits()
1986 Tmp = ComputeNumSignBits(U->getOperand(1), DL, Depth + 1, Q); in ComputeNumSignBits()
1988 Tmp2 = ComputeNumSignBits(U->getOperand(2), DL, Depth + 1, Q); in ComputeNumSignBits()
1994 Tmp = ComputeNumSignBits(U->getOperand(0), DL, Depth + 1, Q); in ComputeNumSignBits()
2001 computeKnownBits(U->getOperand(0), KnownZero, KnownOne, DL, Depth + 1, in ComputeNumSignBits()
2015 Tmp2 = ComputeNumSignBits(U->getOperand(1), DL, Depth + 1, Q); in ComputeNumSignBits()
2020 Tmp2 = ComputeNumSignBits(U->getOperand(1), DL, Depth + 1, Q); in ComputeNumSignBits()
2027 computeKnownBits(U->getOperand(1), KnownZero, KnownOne, DL, Depth + 1, in ComputeNumSignBits()
2044 Tmp = ComputeNumSignBits(U->getOperand(0), DL, Depth + 1, Q); in ComputeNumSignBits()
2058 Tmp = ComputeNumSignBits(PN->getIncomingValue(0), DL, Depth + 1, Q); in ComputeNumSignBits()
2062 Tmp, ComputeNumSignBits(PN->getIncomingValue(i), DL, Depth + 1, Q)); in ComputeNumSignBits()
2077 computeKnownBits(V, KnownZero, KnownOne, DL, Depth, Q); in ComputeNumSignBits()
2560 const DataLayout &DL) { in GetPointerBaseWithConstantOffset() argument
2561 unsigned BitWidth = DL.getPointerTypeSizeInBits(Ptr->getType()); in GetPointerBaseWithConstantOffset()
2569 if (!GEP->accumulateConstantOffset(DL, GEPOffset)) in GetPointerBaseWithConstantOffset()
2739 Value *llvm::GetUnderlyingObject(Value *V, const DataLayout &DL, in GetUnderlyingObject() argument
2757 if (Value *Simplified = SimplifyInstruction(I, DL, nullptr)) { in GetUnderlyingObject()
2770 const DataLayout &DL, unsigned MaxLookup) { in GetUnderlyingObjects() argument
2776 P = GetUnderlyingObject(P, DL, MaxLookup); in GetUnderlyingObjects()
2856 const DataLayout &DL = LI->getModule()->getDataLayout(); in isSafeToSpeculativelyExecute() local
2857 return LI->getPointerOperand()->isDereferenceablePointer(DL); in isSafeToSpeculativelyExecute()
2949 const DataLayout &DL, in computeOverflowForUnsignedMul() argument
2964 computeKnownBits(LHS, LHSKnownZero, LHSKnownOne, DL, /*Depth=*/0, AC, CxtI, in computeOverflowForUnsignedMul()
2966 computeKnownBits(RHS, RHSKnownZero, RHSKnownOne, DL, /*Depth=*/0, AC, CxtI, in computeOverflowForUnsignedMul()
2999 const DataLayout &DL, in computeOverflowForUnsignedAdd() argument
3004 ComputeSignBit(LHS, LHSKnownNonNegative, LHSKnownNegative, DL, /*Depth=*/0, in computeOverflowForUnsignedAdd()
3008 ComputeSignBit(RHS, RHSKnownNonNegative, RHSKnownNegative, DL, /*Depth=*/0, in computeOverflowForUnsignedAdd()