Lines Matching refs:ValueLatticeElement
71 static bool hasSingleValue(const ValueLatticeElement &Val) { in hasSingleValue()
96 static ValueLatticeElement intersect(const ValueLatticeElement &A, in intersect()
97 const ValueLatticeElement &B) { in intersect()
128 return ValueLatticeElement::getRange( in intersect()
164 SmallDenseMap<AssertingVH<Value>, ValueLatticeElement, 4> LatticeElements;
201 const ValueLatticeElement &Result) { in insertResult()
214 Optional<ValueLatticeElement> getCachedValueInfo(Value *V, in getCachedValueInfo()
221 return ValueLatticeElement::getOverdefined(); in getCachedValueInfo()
398 Optional<ValueLatticeElement> getBlockValue(Value *Val, BasicBlock *BB);
399 Optional<ValueLatticeElement> getEdgeValue(Value *V, BasicBlock *F,
406 Optional<ValueLatticeElement> solveBlockValueImpl(Value *Val, BasicBlock *BB);
407 Optional<ValueLatticeElement> solveBlockValueNonLocal(Value *Val,
409 Optional<ValueLatticeElement> solveBlockValuePHINode(PHINode *PN,
411 Optional<ValueLatticeElement> solveBlockValueSelect(SelectInst *S,
415 Optional<ValueLatticeElement> solveBlockValueBinaryOpImpl(
419 Optional<ValueLatticeElement> solveBlockValueBinaryOp(BinaryOperator *BBI,
421 Optional<ValueLatticeElement> solveBlockValueCast(CastInst *CI,
423 Optional<ValueLatticeElement> solveBlockValueOverflowIntrinsic(
425 Optional<ValueLatticeElement> solveBlockValueIntrinsic(IntrinsicInst *II,
427 Optional<ValueLatticeElement> solveBlockValueExtractValue(
431 ValueLatticeElement &BBLV,
440 ValueLatticeElement getValueInBlock(Value *V, BasicBlock *BB,
447 ValueLatticeElement getValueAt(Value *V, Instruction *CxtI);
451 ValueLatticeElement getValueOnEdge(Value *V, BasicBlock *FromBB,
505 ValueLatticeElement::getOverdefined()); in solve()
519 Optional<ValueLatticeElement> BBLV = in solve()
536 Optional<ValueLatticeElement> LazyValueInfoImpl::getBlockValue(Value *Val, in getBlockValue()
540 return ValueLatticeElement::get(VC); in getBlockValue()
542 if (Optional<ValueLatticeElement> OptLatticeVal = in getBlockValue()
548 return ValueLatticeElement::getOverdefined(); in getBlockValue()
554 static ValueLatticeElement getFromRangeMetadata(Instruction *BBI) { in getFromRangeMetadata()
562 return ValueLatticeElement::getRange( in getFromRangeMetadata()
568 return ValueLatticeElement::getOverdefined(); in getFromRangeMetadata()
578 Optional<ValueLatticeElement> Res = solveBlockValueImpl(Val, BB); in solveBlockValue()
587 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueImpl( in solveBlockValueImpl()
610 return ValueLatticeElement::getNot(ConstantPointerNull::get(PT)); in solveBlockValueImpl()
670 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueNonLocal( in solveBlockValueNonLocal()
672 ValueLatticeElement Result; // Start Undefined. in solveBlockValueNonLocal()
678 return ValueLatticeElement::getOverdefined(); in solveBlockValueNonLocal()
691 Optional<ValueLatticeElement> EdgeResult = getEdgeValue(Val, *PI, BB); in solveBlockValueNonLocal()
712 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValuePHINode( in solveBlockValuePHINode()
714 ValueLatticeElement Result; // Start Undefined. in solveBlockValuePHINode()
725 Optional<ValueLatticeElement> EdgeResult = in solveBlockValuePHINode()
748 static ValueLatticeElement getValueFromCondition(Value *Val, Value *Cond,
754 Value *Val, ValueLatticeElement &BBLV, Instruction *BBI) { in intersectAssumeOrGuardBlockValueConstantRange()
791 BBLV = ValueLatticeElement::getNot(ConstantPointerNull::get(PTy)); in intersectAssumeOrGuardBlockValueConstantRange()
795 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueSelect( in solveBlockValueSelect()
798 Optional<ValueLatticeElement> OptTrueVal = in solveBlockValueSelect()
802 ValueLatticeElement &TrueVal = *OptTrueVal; in solveBlockValueSelect()
807 return ValueLatticeElement::getOverdefined(); in solveBlockValueSelect()
809 Optional<ValueLatticeElement> OptFalseVal = in solveBlockValueSelect()
813 ValueLatticeElement &FalseVal = *OptFalseVal; in solveBlockValueSelect()
818 return ValueLatticeElement::getOverdefined(); in solveBlockValueSelect()
844 return ValueLatticeElement::getRange( in solveBlockValueSelect()
851 return ValueLatticeElement::getRange( in solveBlockValueSelect()
854 return ValueLatticeElement::getRange( in solveBlockValueSelect()
861 return ValueLatticeElement::getRange( in solveBlockValueSelect()
864 return ValueLatticeElement::getRange( in solveBlockValueSelect()
905 ValueLatticeElement::getNot(ResNot)); in solveBlockValueSelect()
913 ValueLatticeElement::getNot(ResNot)); in solveBlockValueSelect()
920 ValueLatticeElement Result = TrueVal; in solveBlockValueSelect()
928 Optional<ValueLatticeElement> OptVal = getBlockValue(V, BB); in getRangeFor()
932 ValueLatticeElement &Val = *OptVal; in getRangeFor()
941 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueCast( in solveBlockValueCast()
946 return ValueLatticeElement::getOverdefined(); in solveBlockValueCast()
961 return ValueLatticeElement::getOverdefined(); in solveBlockValueCast()
978 return ValueLatticeElement::getRange(LHSRange.castOp(CI->getOpcode(), in solveBlockValueCast()
982 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueBinaryOpImpl( in solveBlockValueBinaryOpImpl()
998 return ValueLatticeElement::getRange(OpFn(LHSRange, RHSRange)); in solveBlockValueBinaryOpImpl()
1001 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueBinaryOp( in solveBlockValueBinaryOp()
1009 return ValueLatticeElement::getOverdefined(); in solveBlockValueBinaryOp()
1032 Optional<ValueLatticeElement>
1041 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueIntrinsic( in solveBlockValueIntrinsic()
1046 return ValueLatticeElement::getOverdefined(); in solveBlockValueIntrinsic()
1057 return ValueLatticeElement::getRange( in solveBlockValueIntrinsic()
1061 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueExtractValue( in solveBlockValueExtractValue()
1076 return ValueLatticeElement::getOverdefined(); in solveBlockValueExtractValue()
1103 static ValueLatticeElement getValueFromSimpleICmpCondition( in getValueFromSimpleICmpCondition()
1119 return ValueLatticeElement::getRange(std::move(TrueValues)); in getValueFromSimpleICmpCondition()
1122 static ValueLatticeElement getValueFromICmpCondition(Value *Val, ICmpInst *ICI, in getValueFromICmpCondition()
1134 return ValueLatticeElement::get(cast<Constant>(RHS)); in getValueFromICmpCondition()
1136 return ValueLatticeElement::getNot(cast<Constant>(RHS)); in getValueFromICmpCondition()
1141 return ValueLatticeElement::getOverdefined(); in getValueFromICmpCondition()
1160 return ValueLatticeElement::getRange( in getValueFromICmpCondition()
1164 return ValueLatticeElement::getOverdefined(); in getValueFromICmpCondition()
1169 static ValueLatticeElement getValueFromOverflowCondition( in getValueFromOverflowCondition()
1176 return ValueLatticeElement::getOverdefined(); in getValueFromOverflowCondition()
1186 return ValueLatticeElement::getRange(NWR); in getValueFromOverflowCondition()
1189 static ValueLatticeElement
1191 SmallDenseMap<Value*, ValueLatticeElement> &Visited);
1193 static ValueLatticeElement
1195 SmallDenseMap<Value*, ValueLatticeElement> &Visited) { in getValueFromConditionImpl()
1211 return ValueLatticeElement::getOverdefined(); in getValueFromConditionImpl()
1220 return ValueLatticeElement::getOverdefined(); in getValueFromConditionImpl()
1226 static ValueLatticeElement
1228 SmallDenseMap<Value*, ValueLatticeElement> &Visited) { in getValueFromCondition()
1238 ValueLatticeElement getValueFromCondition(Value *Val, Value *Cond, in getValueFromCondition()
1241 SmallDenseMap<Value*, ValueLatticeElement> Visited; in getValueFromCondition()
1262 static ValueLatticeElement constantFoldUser(User *Usr, Value *Op, in constantFoldUser()
1273 return ValueLatticeElement::getRange(ConstantRange(C->getValue())); in constantFoldUser()
1284 return ValueLatticeElement::getRange(ConstantRange(C->getValue())); in constantFoldUser()
1288 return ValueLatticeElement::getRange(ConstantRange(OpConstVal)); in constantFoldUser()
1290 return ValueLatticeElement::getOverdefined(); in constantFoldUser()
1296 static Optional<ValueLatticeElement> getEdgeValueLocal(Value *Val, in getEdgeValueLocal()
1314 return ValueLatticeElement::get(ConstantInt::get( in getEdgeValueLocal()
1319 ValueLatticeElement Result = getValueFromCondition(Val, Condition, in getEdgeValueLocal()
1351 ValueLatticeElement OpLatticeVal = in getEdgeValueLocal()
1394 ValueLatticeElement EdgeLatticeVal = in getEdgeValueLocal()
1412 return ValueLatticeElement::getRange(std::move(EdgesVals)); in getEdgeValueLocal()
1419 Optional<ValueLatticeElement> LazyValueInfoImpl::getEdgeValue( in getEdgeValue()
1423 return ValueLatticeElement::get(VC); in getEdgeValue()
1425 ValueLatticeElement LocalResult = getEdgeValueLocal(Val, BBFrom, BBTo) in getEdgeValue()
1426 .getValueOr(ValueLatticeElement::getOverdefined()); in getEdgeValue()
1431 Optional<ValueLatticeElement> OptInBlock = getBlockValue(Val, BBFrom); in getEdgeValue()
1434 ValueLatticeElement &InBlock = *OptInBlock; in getEdgeValue()
1452 ValueLatticeElement LazyValueInfoImpl::getValueInBlock(Value *V, BasicBlock *BB, in getValueInBlock()
1458 Optional<ValueLatticeElement> OptResult = getBlockValue(V, BB); in getValueInBlock()
1464 ValueLatticeElement Result = *OptResult; in getValueInBlock()
1471 ValueLatticeElement LazyValueInfoImpl::getValueAt(Value *V, Instruction *CxtI) { in getValueAt()
1476 return ValueLatticeElement::get(C); in getValueAt()
1478 ValueLatticeElement Result = ValueLatticeElement::getOverdefined(); in getValueAt()
1487 ValueLatticeElement LazyValueInfoImpl::
1494 Optional<ValueLatticeElement> Result = getEdgeValue(V, FromBB, ToBB, CxtI); in getValueOnEdge()
1597 ValueLatticeElement Result = in getConstant()
1615 ValueLatticeElement Result = in getConstantRange()
1634 ValueLatticeElement Result = in getConstantOnEdge()
1653 ValueLatticeElement Result = in getConstantRangeOnEdge()
1668 getPredicateResult(unsigned Pred, Constant *C, const ValueLatticeElement &Val, in getPredicateResult()
1739 ValueLatticeElement Result = in getPredicateOnEdge()
1762 ValueLatticeElement Result = UseBlockValue in getPredicateAt()
1877 ValueLatticeElement Result = LVIImpl->getValueInBlock( in emitBasicBlockStartAnnot()
1902 ValueLatticeElement Result = LVIImpl->getValueInBlock( in emitInstructionAnnot()