Lines Matching refs:Val

78   /// Val: This stores the current lattice value along with the Constant* for
81 Constant *Val;
85 LVILatticeVal() : Tag(undefined), Val(0), Range(1, true) {}
113 return Val;
118 return Val;
147 Val = V;
165 Val = V;
197 Val = RHS.Val;
204 if (Val == RHS.Val)
210 if (Val == RHS.Val)
236 if (Val == RHS.Val)
253 if (Val == RHS.Val)
275 raw_ostream &operator<<(raw_ostream &OS, const LVILatticeVal &Val)
277 raw_ostream &operator<<(raw_ostream &OS, const LVILatticeVal &Val) {
278 if (Val.isUndefined())
280 if (Val.isOverdefined())
283 if (Val.isNotConstant())
284 return OS << "notconstant<" << *Val.getNotConstant() << '>';
285 else if (Val.isConstantRange())
286 return OS << "constantrange<" << Val.getConstantRange().getLower() << ", "
287 << Val.getConstantRange().getUpper() << '>';
288 return OS << "constant<" << *Val.getConstant() << '>';
347 Value *Val;
353 : Parent(P), Val(V), BB(B), BBLV(LV) { }
357 Parent->OverDefinedCache.insert(std::make_pair(BB, Val));
364 LVILatticeVal getBlockValue(Value *Val, BasicBlock *BB);
367 bool hasBlockValue(Value *Val, BasicBlock *BB);
372 bool solveBlockValue(Value *Val, BasicBlock *BB);
374 Value *Val, BasicBlock *BB);
467 bool LazyValueInfoCache::hasBlockValue(Value *Val, BasicBlock *BB) {
469 if (isa<Constant>(Val))
472 LVIValueHandle ValHandle(Val, this);
479 LVILatticeVal LazyValueInfoCache::getBlockValue(Value *Val, BasicBlock *BB) {
481 if (Constant *VC = dyn_cast<Constant>(Val))
485 return lookup(Val)[BB];
488 bool LazyValueInfoCache::solveBlockValue(Value *Val, BasicBlock *BB) {
489 if (isa<Constant>(Val))
492 ValueCacheEntryTy &Cache = lookup(Val);
500 OverDefinedCacheUpdater ODCacheUpdater(Val, BB, BBLV, this);
518 Instruction *BBI = dyn_cast<Instruction>(Val);
520 return ODCacheUpdater.markResult(solveBlockValueNonLocal(BBLV, Val, BB));
587 Value *Val, BasicBlock *BB) {
593 if (Val->getType()->isPointerTy()) {
594 if (isa<AllocaInst>(Val)) {
598 if (InstructionDereferencesPointer(BI, Val)) {
609 assert(isa<Argument>(Val) && "Unknown live-in to the entry block");
611 PointerType *PTy = cast<PointerType>(Val->getType());
625 EdgesMissing |= !getEdgeValue(Val, *PI, BB, EdgeResult);
639 PointerType *PTy = cast<PointerType>(Val->getType());
773 /// \brief Compute the value of Val on the edge BBFrom -> BBTo. Returns false if
774 /// Val is not constrained on the edge.
775 static bool getEdgeValueLocal(Value *Val, BasicBlock *BBFrom,
790 if (BI->getCondition() == Val) {
792 Type::getInt1Ty(Val->getContext()), isTrueDest));
800 if (ICI->isEquality() && ICI->getOperand(0) == Val) {
814 match(ICI->getOperand(0), m_Add(m_Specific(Val),
818 if (CI && (ICI->getOperand(0) == Val || NegOffset)) {
840 if (SI->getCondition() != Val)
844 unsigned BitWidth = Val->getType()->getIntegerBitWidth();
864 /// \brief Compute the value of Val on the edge BBFrom -> BBTo, or the value at
865 /// the basic block if the edge does not constraint Val.
866 bool LazyValueInfoCache::getEdgeValue(Value *Val, BasicBlock *BBFrom,
869 if (Constant *VC = dyn_cast<Constant>(Val)) {
874 if (getEdgeValueLocal(Val, BBFrom, BBTo, Result)) {
882 if (!hasBlockValue(Val, BBFrom)) {
883 BlockValueStack.push(std::make_pair(BBFrom, Val));
888 LVILatticeVal InBlock = getBlockValue(Val, BBFrom);
898 if (!hasBlockValue(Val, BBFrom)) {
899 BlockValueStack.push(std::make_pair(BBFrom, Val));
904 Result = getBlockValue(Val, BBFrom);