Lines Matching refs:ValueLatticeElement

70 static bool hasSingleValue(const ValueLatticeElement &Val) {  in hasSingleValue()
95 static ValueLatticeElement intersect(const ValueLatticeElement &A, in intersect()
96 const ValueLatticeElement &B) { in intersect()
127 return ValueLatticeElement::getRange( in intersect()
163 SmallDenseMap<AssertingVH<Value>, ValueLatticeElement, 4> LatticeElements;
200 const ValueLatticeElement &Result) { in insertResult()
213 Optional<ValueLatticeElement> getCachedValueInfo(Value *V, in getCachedValueInfo()
220 return ValueLatticeElement::getOverdefined(); in getCachedValueInfo()
397 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( in getBlockValue()
540 return ValueLatticeElement::get(VC); in getBlockValue()
542 if (Optional<ValueLatticeElement> OptLatticeVal = in getBlockValue()
550 return ValueLatticeElement::getOverdefined(); in getBlockValue()
556 static ValueLatticeElement getFromRangeMetadata(Instruction *BBI) { in getFromRangeMetadata()
564 return ValueLatticeElement::getRange( in getFromRangeMetadata()
570 return ValueLatticeElement::getOverdefined(); in getFromRangeMetadata()
580 Optional<ValueLatticeElement> Res = solveBlockValueImpl(Val, BB); in solveBlockValue()
589 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueImpl( in solveBlockValueImpl()
612 return ValueLatticeElement::getNot(ConstantPointerNull::get(PT)); in solveBlockValueImpl()
672 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueNonLocal( in solveBlockValueNonLocal()
674 ValueLatticeElement Result; // Start Undefined. in solveBlockValueNonLocal()
680 return ValueLatticeElement::getOverdefined(); in solveBlockValueNonLocal()
693 Optional<ValueLatticeElement> EdgeResult = getEdgeValue(Val, Pred, BB); in solveBlockValueNonLocal()
714 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValuePHINode( in solveBlockValuePHINode()
716 ValueLatticeElement Result; // Start Undefined. in solveBlockValuePHINode()
727 Optional<ValueLatticeElement> EdgeResult = in solveBlockValuePHINode()
750 static ValueLatticeElement getValueFromCondition(Value *Val, Value *Cond,
756 Value *Val, ValueLatticeElement &BBLV, Instruction *BBI) { in intersectAssumeOrGuardBlockValueConstantRange()
793 BBLV = ValueLatticeElement::getNot(ConstantPointerNull::get(PTy)); in intersectAssumeOrGuardBlockValueConstantRange()
797 static ConstantRange getConstantRangeOrFull(const ValueLatticeElement &Val, in getConstantRangeOrFull()
804 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueSelect( in solveBlockValueSelect()
807 Optional<ValueLatticeElement> OptTrueVal = in solveBlockValueSelect()
811 ValueLatticeElement &TrueVal = *OptTrueVal; in solveBlockValueSelect()
813 Optional<ValueLatticeElement> OptFalseVal = in solveBlockValueSelect()
817 ValueLatticeElement &FalseVal = *OptFalseVal; in solveBlockValueSelect()
846 return ValueLatticeElement::getRange( in solveBlockValueSelect()
853 return ValueLatticeElement::getRange( in solveBlockValueSelect()
856 return ValueLatticeElement::getRange( in solveBlockValueSelect()
863 return ValueLatticeElement::getRange( in solveBlockValueSelect()
866 return ValueLatticeElement::getRange( in solveBlockValueSelect()
880 ValueLatticeElement Result = TrueVal; in solveBlockValueSelect()
888 Optional<ValueLatticeElement> OptVal = getBlockValue(V, BB, CxtI); in getRangeFor()
894 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueCast( in solveBlockValueCast()
899 return ValueLatticeElement::getOverdefined(); in solveBlockValueCast()
914 return ValueLatticeElement::getOverdefined(); in solveBlockValueCast()
931 return ValueLatticeElement::getRange(LHSRange.castOp(CI->getOpcode(), in solveBlockValueCast()
935 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueBinaryOpImpl( in solveBlockValueBinaryOpImpl()
951 return ValueLatticeElement::getRange(OpFn(LHSRange, RHSRange)); in solveBlockValueBinaryOpImpl()
954 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueBinaryOp( in solveBlockValueBinaryOp()
978 Optional<ValueLatticeElement>
987 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueIntrinsic( in solveBlockValueIntrinsic()
1003 return ValueLatticeElement::getRange( in solveBlockValueIntrinsic()
1007 Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueExtractValue( in solveBlockValueExtractValue()
1022 return ValueLatticeElement::getOverdefined(); in solveBlockValueExtractValue()
1059 static ValueLatticeElement getValueFromSimpleICmpCondition( in getValueFromSimpleICmpCondition()
1071 return ValueLatticeElement::getRange(TrueValues.subtract(Offset)); in getValueFromSimpleICmpCondition()
1074 static ValueLatticeElement getValueFromICmpCondition(Value *Val, ICmpInst *ICI, in getValueFromICmpCondition()
1086 return ValueLatticeElement::get(cast<Constant>(RHS)); in getValueFromICmpCondition()
1088 return ValueLatticeElement::getNot(cast<Constant>(RHS)); in getValueFromICmpCondition()
1094 return ValueLatticeElement::getOverdefined(); in getValueFromICmpCondition()
1114 return ValueLatticeElement::getRange( in getValueFromICmpCondition()
1120 return ValueLatticeElement::getRange(ConstantRange::getNonEmpty( in getValueFromICmpCondition()
1135 return ValueLatticeElement::getRange(ConstantRange::getNonEmpty( in getValueFromICmpCondition()
1139 return ValueLatticeElement::getOverdefined(); in getValueFromICmpCondition()
1144 static ValueLatticeElement getValueFromOverflowCondition( in getValueFromOverflowCondition()
1151 return ValueLatticeElement::getOverdefined(); in getValueFromOverflowCondition()
1161 return ValueLatticeElement::getRange(NWR); in getValueFromOverflowCondition()
1164 static Optional<ValueLatticeElement>
1167 SmallDenseMap<Value *, ValueLatticeElement> &Visited, in getValueFromConditionImpl()
1186 return ValueLatticeElement::getOverdefined(); in getValueFromConditionImpl()
1196 ValueLatticeElement V = LV->second; in getValueFromConditionImpl()
1217 ValueLatticeElement getValueFromCondition(Value *Val, Value *Cond, in getValueFromCondition()
1220 SmallDenseMap<Value*, ValueLatticeElement> Visited; in getValueFromCondition()
1232 Visited.try_emplace(CurrentCond, ValueLatticeElement::getOverdefined()); in getValueFromCondition()
1234 Optional<ValueLatticeElement> Result = getValueFromConditionImpl( in getValueFromCondition()
1264 static ValueLatticeElement constantFoldUser(User *Usr, Value *Op, in constantFoldUser()
1275 return ValueLatticeElement::getRange(ConstantRange(C->getValue())); in constantFoldUser()
1286 return ValueLatticeElement::getRange(ConstantRange(C->getValue())); in constantFoldUser()
1290 return ValueLatticeElement::getRange(ConstantRange(OpConstVal)); in constantFoldUser()
1292 return ValueLatticeElement::getOverdefined(); in constantFoldUser()
1298 static Optional<ValueLatticeElement> getEdgeValueLocal(Value *Val, in getEdgeValueLocal()
1316 return ValueLatticeElement::get(ConstantInt::get( in getEdgeValueLocal()
1321 ValueLatticeElement Result = getValueFromCondition(Val, Condition, in getEdgeValueLocal()
1353 ValueLatticeElement OpLatticeVal = in getEdgeValueLocal()
1396 ValueLatticeElement EdgeLatticeVal = in getEdgeValueLocal()
1414 return ValueLatticeElement::getRange(std::move(EdgesVals)); in getEdgeValueLocal()
1421 Optional<ValueLatticeElement> LazyValueInfoImpl::getEdgeValue( in getEdgeValue()
1425 return ValueLatticeElement::get(VC); in getEdgeValue()
1427 ValueLatticeElement LocalResult = in getEdgeValue()
1429 .value_or(ValueLatticeElement::getOverdefined()); in getEdgeValue()
1434 Optional<ValueLatticeElement> OptInBlock = in getEdgeValue()
1438 ValueLatticeElement &InBlock = *OptInBlock; in getEdgeValue()
1453 ValueLatticeElement LazyValueInfoImpl::getValueInBlock(Value *V, BasicBlock *BB, in getValueInBlock()
1459 Optional<ValueLatticeElement> OptResult = getBlockValue(V, BB, CxtI); in getValueInBlock()
1466 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()
1900 ValueLatticeElement Result = LVIImpl->getValueInBlock( in emitBasicBlockStartAnnot()
1925 ValueLatticeElement Result = LVIImpl->getValueInBlock( in emitInstructionAnnot()