Lines Matching defs:IV
177 const ValueLatticeElement &IV = Solver.getLatticeValueFor(V);
178 return IV.isConstantRange(/*UndefAllowed=*/false) &&
179 IV.getConstantRange().isAllNonNegative();
466 ConstantInt *getConstantInt(const ValueLatticeElement &IV, Type *Ty) const {
467 return dyn_cast_or_null<ConstantInt>(getConstant(IV, Ty));
471 void pushToWorkList(ValueLatticeElement &IV, Value *V);
473 // Helper to push \p V to the worklist, after updating it to \p IV. Also
475 void pushToWorkListMsg(ValueLatticeElement &IV, Value *V);
480 bool markConstant(ValueLatticeElement &IV, Value *V, Constant *C,
488 bool markNotConstant(ValueLatticeElement &IV, Value *V, Constant *C);
490 bool markNotNull(ValueLatticeElement &IV, Value *V) {
491 return markNotConstant(IV, V, Constant::getNullValue(V->getType()));
498 bool markConstantRange(ValueLatticeElement &IV, Value *V,
504 bool markOverdefined(ValueLatticeElement &IV, Value *V);
506 /// Merge \p MergeWithV into \p IV and push \p V to the worklist, if \p IV
508 bool mergeInValue(ValueLatticeElement &IV, Value *V,
758 ValueLatticeElement &IV = TrackedGlobals[GV];
759 IV.markConstant(GV->getInitializer());
937 void SCCPInstVisitor::pushToWorkList(ValueLatticeElement &IV, Value *V) {
938 if (IV.isOverdefined()) {
947 void SCCPInstVisitor::pushToWorkListMsg(ValueLatticeElement &IV, Value *V) {
948 LLVM_DEBUG(dbgs() << "updated " << IV << ": " << *V << '\n');
949 pushToWorkList(IV, V);
952 bool SCCPInstVisitor::markConstant(ValueLatticeElement &IV, Value *V,
954 if (!IV.markConstant(C, MayIncludeUndef))
957 pushToWorkList(IV, V);
961 bool SCCPInstVisitor::markNotConstant(ValueLatticeElement &IV, Value *V,
963 if (!IV.markNotConstant(C))
966 pushToWorkList(IV, V);
970 bool SCCPInstVisitor::markConstantRange(ValueLatticeElement &IV, Value *V,
972 if (!IV.markConstantRange(CR))
975 pushToWorkList(IV, V);
979 bool SCCPInstVisitor::markOverdefined(ValueLatticeElement &IV, Value *V) {
980 if (!IV.markOverdefined())
988 pushToWorkList(IV, V);
1092 bool SCCPInstVisitor::mergeInValue(ValueLatticeElement &IV, Value *V,
1095 if (IV.mergeIn(MergeWithV, Opts)) {
1096 pushToWorkList(IV, V);
1098 << IV << "\n");
1276 ValueLatticeElement IV = getValueState(PN.getIncomingValue(i));
1277 PhiState.mergeIn(IV);
1498 ValueLatticeElement &IV = ValueState[&I];
1501 if (IV.isOverdefined())
1511 return (void)markConstant(IV, &I, C);
1523 ValueLatticeElement &IV = ValueState[&I];
1526 if (IV.isOverdefined())
1535 return (void)markConstant(IV, &I, getConstant(V0State, I.getType()));
1545 ValueLatticeElement &IV = ValueState[&I];
1546 if (IV.isOverdefined())
1739 ValueLatticeElement &IV = ValueState[&I];
1747 return (void)markOverdefined(IV, &I);
1758 mergeInValue(IV, &I, It->second, getMaxWidenStepsOpts());
1766 return (void)markConstant(IV, &I, C);
1884 ValueLatticeElement &IV = ValueState[&CB];
1915 IV, &CB,
1923 mergeInValue(IV, &CB, CondVal);
1928 mergeInValue(IV, &CB,
1933 return (void)mergeInValue(IV, &CB, CopyOfVal);