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, Pred, 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()
804 Optional<ValueLatticeElement> OptFalseVal = in solveBlockValueSelect()
808 ValueLatticeElement &FalseVal = *OptFalseVal; in solveBlockValueSelect()
834 return ValueLatticeElement::getRange( in solveBlockValueSelect()
841 return ValueLatticeElement::getRange( in solveBlockValueSelect()
844 return ValueLatticeElement::getRange( in solveBlockValueSelect()
851 return ValueLatticeElement::getRange( in solveBlockValueSelect()
854 return ValueLatticeElement::getRange( in solveBlockValueSelect()
868 ValueLatticeElement Result = TrueVal; in solveBlockValueSelect()
876 Optional<ValueLatticeElement> OptVal = getBlockValue(V, BB); in getRangeFor()
880 ValueLatticeElement &Val = *OptVal; in getRangeFor()
889 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueCast( in solveBlockValueCast()
894 return ValueLatticeElement::getOverdefined(); in solveBlockValueCast()
909 return ValueLatticeElement::getOverdefined(); in solveBlockValueCast()
926 return ValueLatticeElement::getRange(LHSRange.castOp(CI->getOpcode(), in solveBlockValueCast()
930 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueBinaryOpImpl( in solveBlockValueBinaryOpImpl()
946 return ValueLatticeElement::getRange(OpFn(LHSRange, RHSRange)); in solveBlockValueBinaryOpImpl()
949 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueBinaryOp( in solveBlockValueBinaryOp()
957 return ValueLatticeElement::getOverdefined(); in solveBlockValueBinaryOp()
980 Optional<ValueLatticeElement>
989 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueIntrinsic( in solveBlockValueIntrinsic()
1005 return ValueLatticeElement::getRange( in solveBlockValueIntrinsic()
1009 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueExtractValue( in solveBlockValueExtractValue()
1024 return ValueLatticeElement::getOverdefined(); in solveBlockValueExtractValue()
1061 static ValueLatticeElement getValueFromSimpleICmpCondition( in getValueFromSimpleICmpCondition()
1073 return ValueLatticeElement::getRange(TrueValues.subtract(Offset)); in getValueFromSimpleICmpCondition()
1076 static ValueLatticeElement getValueFromICmpCondition(Value *Val, ICmpInst *ICI, in getValueFromICmpCondition()
1088 return ValueLatticeElement::get(cast<Constant>(RHS)); in getValueFromICmpCondition()
1090 return ValueLatticeElement::getNot(cast<Constant>(RHS)); in getValueFromICmpCondition()
1096 return ValueLatticeElement::getOverdefined(); in getValueFromICmpCondition()
1115 return ValueLatticeElement::getRange( in getValueFromICmpCondition()
1123 return ValueLatticeElement::getRange(ConstantRange::getNonEmpty( in getValueFromICmpCondition()
1129 return ValueLatticeElement::getOverdefined(); in getValueFromICmpCondition()
1134 static ValueLatticeElement getValueFromOverflowCondition( in getValueFromOverflowCondition()
1141 return ValueLatticeElement::getOverdefined(); in getValueFromOverflowCondition()
1151 return ValueLatticeElement::getRange(NWR); in getValueFromOverflowCondition()
1154 static Optional<ValueLatticeElement>
1157 SmallDenseMap<Value *, ValueLatticeElement> &Visited, in getValueFromConditionImpl()
1176 return ValueLatticeElement::getOverdefined(); in getValueFromConditionImpl()
1186 ValueLatticeElement V = LV->second; in getValueFromConditionImpl()
1207 ValueLatticeElement getValueFromCondition(Value *Val, Value *Cond, in getValueFromCondition()
1210 SmallDenseMap<Value*, ValueLatticeElement> Visited; in getValueFromCondition()
1222 Visited.try_emplace(CurrentCond, ValueLatticeElement::getOverdefined()); in getValueFromCondition()
1224 Optional<ValueLatticeElement> Result = getValueFromConditionImpl( in getValueFromCondition()
1254 static ValueLatticeElement constantFoldUser(User *Usr, Value *Op, in constantFoldUser()
1265 return ValueLatticeElement::getRange(ConstantRange(C->getValue())); in constantFoldUser()
1276 return ValueLatticeElement::getRange(ConstantRange(C->getValue())); in constantFoldUser()
1280 return ValueLatticeElement::getRange(ConstantRange(OpConstVal)); in constantFoldUser()
1282 return ValueLatticeElement::getOverdefined(); in constantFoldUser()
1288 static Optional<ValueLatticeElement> getEdgeValueLocal(Value *Val, in getEdgeValueLocal()
1306 return ValueLatticeElement::get(ConstantInt::get( in getEdgeValueLocal()
1311 ValueLatticeElement Result = getValueFromCondition(Val, Condition, in getEdgeValueLocal()
1343 ValueLatticeElement OpLatticeVal = in getEdgeValueLocal()
1386 ValueLatticeElement EdgeLatticeVal = in getEdgeValueLocal()
1404 return ValueLatticeElement::getRange(std::move(EdgesVals)); in getEdgeValueLocal()
1411 Optional<ValueLatticeElement> LazyValueInfoImpl::getEdgeValue( in getEdgeValue()
1415 return ValueLatticeElement::get(VC); in getEdgeValue()
1417 ValueLatticeElement LocalResult = getEdgeValueLocal(Val, BBFrom, BBTo) in getEdgeValue()
1418 .getValueOr(ValueLatticeElement::getOverdefined()); in getEdgeValue()
1423 Optional<ValueLatticeElement> OptInBlock = getBlockValue(Val, BBFrom); in getEdgeValue()
1426 ValueLatticeElement &InBlock = *OptInBlock; in getEdgeValue()
1444 ValueLatticeElement LazyValueInfoImpl::getValueInBlock(Value *V, BasicBlock *BB, in getValueInBlock()
1450 Optional<ValueLatticeElement> OptResult = getBlockValue(V, BB); in getValueInBlock()
1456 ValueLatticeElement Result = *OptResult; in getValueInBlock()
1463 ValueLatticeElement LazyValueInfoImpl::getValueAt(Value *V, Instruction *CxtI) { in getValueAt()
1468 return ValueLatticeElement::get(C); in getValueAt()
1470 ValueLatticeElement Result = ValueLatticeElement::getOverdefined(); in getValueAt()
1479 ValueLatticeElement LazyValueInfoImpl::
1486 Optional<ValueLatticeElement> Result = getEdgeValue(V, FromBB, ToBB, CxtI); in getValueOnEdge()
1589 ValueLatticeElement Result = in getConstant()
1607 ValueLatticeElement Result = in getConstantRange()
1626 ValueLatticeElement Result = in getConstantOnEdge()
1645 ValueLatticeElement Result = in getConstantRangeOnEdge()
1660 getPredicateResult(unsigned Pred, Constant *C, const ValueLatticeElement &Val, in getPredicateResult()
1731 ValueLatticeElement Result = in getPredicateOnEdge()
1754 ValueLatticeElement Result = UseBlockValue in getPredicateAt()
1887 ValueLatticeElement Result = LVIImpl->getValueInBlock( in emitBasicBlockStartAnnot()
1912 ValueLatticeElement Result = LVIImpl->getValueInBlock( in emitInstructionAnnot()