Lines Matching refs:CxtI
71 const Instruction *CxtI; member
86 Query(const DataLayout &DL, AssumptionCache *AC, const Instruction *CxtI, in Query()
88 : DL(DL), AC(AC), CxtI(CxtI), DT(DT), NumExcluded(0) {} in Query()
91 : DL(Q.DL), AC(Q.AC), CxtI(Q.CxtI), DT(Q.DT), NumExcluded(Q.NumExcluded) { in Query()
108 static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) { in safeCxtI() argument
111 if (CxtI && CxtI->getParent()) in safeCxtI()
112 return CxtI; in safeCxtI()
115 CxtI = dyn_cast<Instruction>(V); in safeCxtI()
116 if (CxtI && CxtI->getParent()) in safeCxtI()
117 return CxtI; in safeCxtI()
127 AssumptionCache *AC, const Instruction *CxtI, in computeKnownBits() argument
130 Query(DL, AC, safeCxtI(V, CxtI), DT)); in computeKnownBits()
134 AssumptionCache *AC, const Instruction *CxtI, in haveNoCommonBitsSet() argument
143 computeKnownBits(LHS, LHSKnownZero, LHSKnownOne, DL, 0, AC, CxtI, DT); in haveNoCommonBitsSet()
144 computeKnownBits(RHS, RHSKnownZero, RHSKnownOne, DL, 0, AC, CxtI, DT); in haveNoCommonBitsSet()
153 AssumptionCache *AC, const Instruction *CxtI, in ComputeSignBit() argument
156 Query(DL, AC, safeCxtI(V, CxtI), DT)); in ComputeSignBit()
164 const Instruction *CxtI, in isKnownToBeAPowerOfTwo() argument
167 Query(DL, AC, safeCxtI(V, CxtI), DT)); in isKnownToBeAPowerOfTwo()
173 AssumptionCache *AC, const Instruction *CxtI, in isKnownNonZero() argument
175 return ::isKnownNonZero(V, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT)); in isKnownNonZero()
179 AssumptionCache *AC, const Instruction *CxtI, in isKnownNonNegative() argument
182 ComputeSignBit(V, NonNegative, Negative, DL, Depth, AC, CxtI, DT); in isKnownNonNegative()
187 AssumptionCache *AC, const Instruction *CxtI, in isKnownPositive() argument
194 return isKnownNonNegative(V, DL, Depth, AC, CxtI, DT) && in isKnownPositive()
195 isKnownNonZero(V, DL, Depth, AC, CxtI, DT); in isKnownPositive()
199 AssumptionCache *AC, const Instruction *CxtI, in isKnownNegative() argument
202 ComputeSignBit(V, NonNegative, Negative, DL, Depth, AC, CxtI, DT); in isKnownNegative()
209 AssumptionCache *AC, const Instruction *CxtI, in isKnownNonEqual() argument
212 safeCxtI(V1, safeCxtI(V2, CxtI)), in isKnownNonEqual()
221 const Instruction *CxtI, const DominatorTree *DT) { in MaskedValueIsZero() argument
223 Query(DL, AC, safeCxtI(V, CxtI), DT)); in MaskedValueIsZero()
230 const Instruction *CxtI, in ComputeNumSignBits() argument
232 return ::ComputeNumSignBits(V, Depth, Query(DL, AC, safeCxtI(V, CxtI), DT)); in ComputeNumSignBits()
459 static bool isValidAssumeForContext(Value *V, const Instruction *CxtI, in isValidAssumeForContext() argument
472 if (DT->dominates(Inv, CxtI)) { in isValidAssumeForContext()
474 } else if (Inv->getParent() == CxtI->getParent()) { in isValidAssumeForContext()
478 std::next(BasicBlock::const_iterator(CxtI)), in isValidAssumeForContext()
483 return !isEphemeralValueOf(Inv, CxtI); in isValidAssumeForContext()
490 if (Inv->getParent() == CxtI->getParent()->getSinglePredecessor()) { in isValidAssumeForContext()
492 } else if (Inv->getParent() == CxtI->getParent()) { in isValidAssumeForContext()
497 if (&*I == CxtI) in isValidAssumeForContext()
502 std::next(BasicBlock::const_iterator(CxtI)), in isValidAssumeForContext()
507 return !isEphemeralValueOf(Inv, CxtI); in isValidAssumeForContext()
514 const Instruction *CxtI, in isValidAssumeForContext() argument
516 return ::isValidAssumeForContext(const_cast<Instruction *>(I), CxtI, DT); in isValidAssumeForContext()
524 if (!Q.AC || !Q.CxtI) in computeKnownBitsFromAssume()
533 assert(I->getParent()->getParent() == Q.CxtI->getParent()->getParent() && in computeKnownBitsFromAssume()
547 if (Arg == V && isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
567 Pred == ICmpInst::ICMP_EQ && isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
576 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
590 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
604 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
618 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
632 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
649 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
666 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
677 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
690 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
703 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
713 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
724 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
735 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
746 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
757 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
767 isValidAssumeForContext(I, Q.CxtI, Q.DT)) { in computeKnownBitsFromAssume()
3278 const Instruction *CxtI, in computeOverflowForUnsignedMul() argument
3291 computeKnownBits(LHS, LHSKnownZero, LHSKnownOne, DL, /*Depth=*/0, AC, CxtI, in computeOverflowForUnsignedMul()
3293 computeKnownBits(RHS, RHSKnownZero, RHSKnownOne, DL, /*Depth=*/0, AC, CxtI, in computeOverflowForUnsignedMul()
3328 const Instruction *CxtI, in computeOverflowForUnsignedAdd() argument
3332 AC, CxtI, DT); in computeOverflowForUnsignedAdd()
3336 AC, CxtI, DT); in computeOverflowForUnsignedAdd()
3356 AssumptionCache *AC, const Instruction *CxtI, const DominatorTree *DT) { in computeOverflowForSignedAdd() argument
3364 AC, CxtI, DT); in computeOverflowForSignedAdd()
3366 AC, CxtI, DT); in computeOverflowForSignedAdd()
3388 /*Depth=*/0, AC, CxtI, DT); in computeOverflowForSignedAdd()
3462 const Instruction *CxtI, in computeOverflowForSignedAdd() argument
3465 Add, DL, AC, CxtI, DT); in computeOverflowForSignedAdd()
3471 const Instruction *CxtI, in computeOverflowForSignedAdd() argument
3473 return ::computeOverflowForSignedAdd(LHS, RHS, nullptr, DL, AC, CxtI, DT); in computeOverflowForSignedAdd()
3960 AssumptionCache *AC, const Instruction *CxtI, in isTruePredicate() argument
3998 computeKnownBits(X, KnownZero, KnownOne, DL, Depth + 1, AC, CxtI, DT); in isTruePredicate()
4023 const Instruction *CxtI, const DominatorTree *DT) { in isImpliedCondOperands() argument
4030 if (isTruePredicate(CmpInst::ICMP_SLE, BLHS, ALHS, DL, Depth, AC, CxtI, in isImpliedCondOperands()
4032 isTruePredicate(CmpInst::ICMP_SLE, ARHS, BRHS, DL, Depth, AC, CxtI, DT)) in isImpliedCondOperands()
4038 if (isTruePredicate(CmpInst::ICMP_ULE, BLHS, ALHS, DL, Depth, AC, CxtI, in isImpliedCondOperands()
4040 isTruePredicate(CmpInst::ICMP_ULE, ARHS, BRHS, DL, Depth, AC, CxtI, DT)) in isImpliedCondOperands()
4101 const Instruction *CxtI, in isImpliedCondition() argument
4155 CxtI, DT); in isImpliedCondition()