Lines Matching +defs:Variable +defs:Value
92 Value *Op0;
93 Value *Op1;
97 ConditionTy(CmpInst::Predicate Pred, Value *Op0, Value *Op1)
139 FactOrCheck(DomTreeNode *DTN, CmpInst::Predicate Pred, Value *Op0, Value *Op1,
145 Value *Op0, Value *Op1,
215 SmallVector<Value *, 2> ValuesToRelease;
218 SmallVector<Value *, 2> ValuesToRelease)
276 ConstraintInfo(const DataLayout &DL, ArrayRef<Value *> FunctionArgs)
280 for (Value *Arg : FunctionArgs) {
288 DenseMap<Value *, unsigned> &getValue2Index(bool Signed) {
291 const DenseMap<Value *, unsigned> &getValue2Index(bool Signed) const {
307 bool doesHold(CmpInst::Predicate Pred, Value *A, Value *B) const;
309 void addFact(CmpInst::Predicate Pred, Value *A, Value *B, unsigned NumIn,
316 ConstraintTy getConstraint(CmpInst::Predicate Pred, Value *Op0, Value *Op1,
317 SmallVectorImpl<Value *> &NewVariables) const;
326 ConstraintTy getConstraintForSolving(CmpInst::Predicate Pred, Value *Op0,
327 Value *Op1) const;
331 void transferToOtherSystem(CmpInst::Predicate Pred, Value *A, Value *B,
336 /// Represents a (Coefficient * Variable) entry after IR decomposition.
339 Value *Variable;
343 DecompEntry(int64_t Coefficient, Value *Variable,
345 : Coefficient(Coefficient), Variable(Variable),
355 Decomposition(Value *V, bool IsKnownNonNegative = false) {
384 // Variable and constant offsets for a chain of GEPs, with base pointer BasePtr.
386 Value *BasePtr;
388 MapVector<Value *, APInt> VariableOffsets;
413 MapVector<Value *, APInt> VariableOffsets2;
433 static Decomposition decompose(Value *V,
473 // Variable } where Coefficient * Variable. The sum of the constant offset and
475 static Decomposition decompose(Value *V,
479 auto MergeResults = [&Preconditions, IsSigned, &DL](Value *A, Value *B,
511 Value *Op0;
512 Value *Op1;
552 Value *Op0;
564 Value *Op1;
618 ConstraintInfo::getConstraint(CmpInst::Predicate Pred, Value *Op0, Value *Op1,
619 SmallVectorImpl<Value *> &NewVariables) const {
675 SmallDenseMap<Value *, unsigned> NewIndexMap;
677 &NewIndexMap](Value *V) -> unsigned {
690 GetOrAddIndex(KV.Variable);
699 SmallDenseMap<Value *, bool> KnownNonNegativeVariables;
702 R[GetOrAddIndex(KV.Variable)] += KV.Coefficient;
704 KnownNonNegativeVariables.insert({KV.Variable, KV.IsKnownNonNegative});
709 if (SubOverflow(R[GetOrAddIndex(KV.Variable)], KV.Coefficient,
710 R[GetOrAddIndex(KV.Variable)]))
713 KnownNonNegativeVariables.insert({KV.Variable, KV.IsKnownNonNegative});
726 // Remove any (Coefficient, Variable) entry where the Coefficient is 0 for new
733 Value *RemovedV = NewVariables.pop_back_val();
750 Value *Op0,
751 Value *Op1) const {
771 SmallVector<Value *> NewVariables;
829 bool ConstraintInfo::doesHold(CmpInst::Predicate Pred, Value *A,
830 Value *B) const {
837 CmpInst::Predicate Pred, Value *A, Value *B, unsigned NumIn,
839 auto IsKnownNonNegative = [this](Value *V) {
896 const DenseMap<Value *, unsigned> &Value2Index) {
908 Value *A;
909 Value *B;
943 Value *StartValue = nullptr;
1076 Value *A, *B;
1122 Value *V = Case.getCaseValue();
1135 Value *Cond = Br->getCondition();
1139 Value *Op0, *Op1;
1151 SmallVector<Value *> CondWorkList;
1152 SmallPtrSet<Value *, 8> SeenCond;
1153 auto QueueValue = [&CondWorkList, &SeenCond](Value *V) {
1160 Value *Cur = CondWorkList.pop_back_val();
1200 Value *LHS, Value *RHS) {
1215 Value *LHS;
1216 Value *RHS;
1218 ReproducerEntry(ICmpInst::Predicate Pred, Value *LHS, Value *RHS)
1241 SmallVector<Value *> Args;
1242 SmallPtrSet<Value *, 8> Seen;
1248 auto CollectArguments = [&](ArrayRef<Value *> Ops, bool IsSigned) {
1250 SmallVector<Value *, 4> WorkList(Ops);
1252 Value *V = WorkList.pop_back_val();
1302 auto CloneInstructions = [&](ArrayRef<Value *> Ops, bool IsSigned) {
1303 SmallVector<Value *, 4> WorkList(Ops);
1307 Value *V = WorkList.pop_back_val();
1358 static std::optional<bool> checkCondition(CmpInst::Predicate Pred, Value *A,
1359 Value *B, Instruction *CheckInst,
1458 Value *LHS = I->getOperand(0);
1459 Value *RHS = I->getOperand(1);
1486 for (Value *V : E.ValuesToRelease)
1502 Value *A, *B;
1554 void ConstraintInfo::addFact(CmpInst::Predicate Pred, Value *A, Value *B,
1559 SmallVector<Value *> NewVariables;
1578 SmallVector<Value *, 2> ValuesToRelease;
1580 for (Value *V : NewVariables) {
1595 for (Value *V : NewVariables) {
1601 SmallVector<Value *, 2>());
1612 SmallVector<Value *, 2>());
1617 static bool replaceSubOverflowUses(IntrinsicInst *II, Value *A, Value *B,
1621 Value *Sub = nullptr;
1652 auto DoesConditionHold = [](CmpInst::Predicate Pred, Value *A, Value *B,
1666 Value *A = II->getArgOperand(0);
1667 Value *B = II->getArgOperand(1);
1682 SmallVector<Value *> FunctionArgs;
1683 for (Value &Arg : F.args())
1708 Value *V0 = B.isConditionFact() ? B.Cond.Op0 : B.Inst->getOperand(0);
1709 Value *V1 = B.isConditionFact() ? B.Cond.Op1 : B.Inst->getOperand(1);
1786 auto AddFact = [&](CmpInst::Predicate Pred, Value *A, Value *B) {
1815 Value *X;
1833 Value *A = nullptr, *B = nullptr;