Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Value

50 static cl::opt<bool> EnableDomConditions("value-tracking-dom-conditions",
53 // This is expensive, so we only do it for the top level query value.
64 // Controls the number of uses of the value searched for possible
90 typedef SmallPtrSet<const Value *, 8> ExclInvsSet;
107 Query(const Query &Q, const Value *NewExcl)
114 // Given the provided Value and, potentially, a context instruction, return
116 static const Instruction *safeCxtI(const Value *V, const Instruction *CxtI) {
122 // If the value is really an already-inserted instruction, then use that.
130 static void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne,
134 void llvm::computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne,
142 bool llvm::haveNoCommonBitsSet(Value *LHS, Value *RHS, const DataLayout &DL,
157 static void ComputeSignBit(Value *V, bool &KnownZero, bool &KnownOne,
161 void llvm::ComputeSignBit(Value *V, bool &KnownZero, bool &KnownOne,
169 static bool isKnownToBeAPowerOfTwo(Value *V, bool OrZero, unsigned Depth,
172 bool llvm::isKnownToBeAPowerOfTwo(Value *V, const DataLayout &DL, bool OrZero,
180 static bool isKnownNonZero(Value *V, const DataLayout &DL, unsigned Depth,
183 bool llvm::isKnownNonZero(Value *V, const DataLayout &DL, unsigned Depth,
189 bool llvm::isKnownNonNegative(Value *V, const DataLayout &DL, unsigned Depth,
197 static bool isKnownNonEqual(Value *V1, Value *V2, const DataLayout &DL,
200 bool llvm::isKnownNonEqual(Value *V1, Value *V2, const DataLayout &DL,
208 static bool MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL,
211 bool llvm::MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL,
218 static unsigned ComputeNumSignBits(Value *V, const DataLayout &DL,
221 unsigned llvm::ComputeNumSignBits(Value *V, const DataLayout &DL,
228 static void computeKnownBitsAddSub(bool Add, Value *Op0, Value *Op1, bool NSW,
308 static void computeKnownBitsMul(Value *Op0, Value *Op1, bool NSW,
396 static bool isEphemeralValueOf(Instruction *I, const Value *E) {
397 SmallVector<const Value *, 16> WorkSet(1, I);
398 SmallPtrSet<const Value *, 32> Visited;
399 SmallPtrSet<const Value *, 16> EphValues;
408 const Value *V = WorkSet.pop_back_val();
412 // If all uses of this value are ephemeral, then so is this value.
454 static bool isValidAssumeForContext(Value *V, const Query &Q) {
545 static void computeKnownBitsFromTrueCondition(Value *V, ICmpInst *Cmp,
550 Value *LHS = Cmp->getOperand(0);
551 Value *RHS = Cmp->getOperand(1);
619 static void computeKnownBitsFromDominatingCondition(Value *V, APInt &KnownZero,
647 // the value we're interested in. This is independent of dom structure,
727 static void computeKnownBitsFromAssume(Value *V, APInt &KnownZero,
747 // We're running this loop for once for each value queried resulting in a
753 Value *Arg = I->getArgOperand(0);
766 Value *A, *B;
1004 // limit value (which implies all bits are known).
1054 // propagate the undef than to pick a value here using known bits).
1086 Value *Y = nullptr;
1357 Value *Index = I->getOperand(i);
1402 Value *L = P->getIncomingValue(i);
1403 Value *R = P->getIncomingValue(!i);
1416 Value *LL = LU->getOperand(0);
1417 Value *LR = LU->getOperand(1);
1448 // Skip if every incoming value references to ourself.
1454 for (Value *IncValue : P->incoming_values()) {
1557 static unsigned getAlignment(const Value *V, const DataLayout &DL) {
1612 void computeKnownBits(Value *V, APInt &KnownZero, APInt &KnownOne,
1614 assert(V && "No Value?");
1692 // this value at the given context.
1702 void ComputeSignBit(Value *V, bool &KnownZero, bool &KnownOne,
1717 /// Return true if the given value is known to have exactly one
1721 bool isKnownToBeAPowerOfTwo(Value *V, bool OrZero, unsigned Depth,
1745 Value *X = nullptr, *Y = nullptr;
1875 /// ensure that the value it's attached to is never Value? 'RangeType' is
1876 /// is the type of the value described by the range.
1878 const APInt& Value) {
1887 if (Range.contains(Value))
1893 /// Return true if the given value is known to be non-zero when defined.
1897 bool isKnownNonZero(Value *V, const DataLayout &DL, unsigned Depth,
1911 // If the possible ranges don't contain zero, then the value is
1937 Value *X = nullptr, *Y = nullptr;
1945 // shl X, Y != 0 if X is odd. Note that the value of the shift is undefined
1959 // shr X, Y != 0 if X is negative. Note that the value of the shift is not
2050 // starting value, as these are common as induction variables.
2052 Value *Start = PN->getIncomingValue(0);
2053 Value *Induction = PN->getIncomingValue(1);
2076 static bool isAddOfNonZero(Value *V1, Value *V2, const DataLayout &DL,
2081 Value *Op = nullptr;
2092 static bool isKnownNonEqual(Value *V1, Value *V2, const DataLayout &DL,
2129 bool MaskedValueIsZero(Value *V, const APInt &Mask, const DataLayout &DL,
2146 unsigned ComputeNumSignBits(Value *V, const DataLayout &DL, unsigned Depth,
2266 // Special case decrementing a value (ADD X, -1):
2358 // the number of identical bits in the top of the input value.
2370 bool llvm::ComputeMultiple(Value *V, unsigned Base, Value *&Multiple,
2374 assert(V && "No Value?");
2418 Value *Op0 = I->getOperand(0);
2419 Value *Op1 = I->getOperand(1);
2432 Value *Mul0 = nullptr;
2456 Value *Mul1 = nullptr;
2486 /// Return true if we can prove that the specified FP value is never equal to
2492 bool llvm::CannotBeNegativeZero(const Value *V, unsigned Depth) {
2543 bool llvm::CannotBeOrderedLessThanZero(const Value *V, unsigned Depth) {
2599 /// If the specified value can be set by repeating the same byte in memory,
2600 /// return the i8 value that it is represented with. This is
2602 /// i16 0xF0F0, double 0.0 etc. If the value can't be handled with a repeated
2604 Value *llvm::isBytewiseValue(Value *V) {
2614 // corresponding integer value is "byteable". An important case is 0.0.
2637 Value *Elt = CA->getElementAsConstant(0);
2638 Value *Val = isBytewiseValue(Elt);
2665 static Value *BuildSubAggregate(Value *From, Value* To, Type *IndexedType,
2672 Value *OrigTo = To;
2677 Value *PrevTo = To;
2682 // Couldn't find any inserted value for this index? Cleanup
2692 // If we successfully found a value for each of our subaggregates
2697 // the struct's elements had a value that was inserted directly. In the latter
2701 // Find the value that is at that particular spot
2702 Value *V = FindInsertedValue(From, Idxs);
2707 // Insert the value in the new (sub) aggregrate
2713 // struct) into a new value. For example, given the struct:
2724 static Value *BuildSubAggregate(Value *From, ArrayRef<unsigned> idx_range,
2729 Value *To = UndefValue::get(IndexedType);
2737 /// the scalar value indexed is already around as a register, for example if it
2742 Value *llvm::FindInsertedValue(Value *V, ArrayRef<unsigned> idx_range,
2785 // This insert value inserts something else than what we are looking for.
2786 // See if the (aggregate) value inserted into has the value we are
2794 // the inserted value, passing any remaining indices.
2801 // If we're extracting a value from an aggregate that was extracted from
2810 // Add indices from the extract value instruction
2821 // Otherwise, we don't know (such as, extracting from a function return value
2828 Value *llvm::GetPointerBaseWithConstantOffset(Value *Ptr, int64_t &Offset,
2863 bool llvm::getConstantStringInfo(const Value *V, StringRef &Str,
2870 // If the value is a GEP instruction or constant expression, treat it as an
2884 // has value 0 so that we are sure we're indexing into the initializer.
2949 static uint64_t GetStringLengthH(Value *V, SmallPtrSetImpl<PHINode*> &PHIs) {
2961 for (Value *IncValue : PN->incoming_values()) {
2998 uint64_t llvm::GetStringLength(Value *V) {
3011 // Find the loop-defined value.
3016 // Find the value from previous iteration.
3034 Value *llvm::GetUnderlyingObject(Value *V, const DataLayout &DL,
3052 if (Value *Simplified = SimplifyInstruction(I, DL, nullptr)) {
3064 void llvm::GetUnderlyingObjects(Value *V, SmallVectorImpl<Value *> &Objects,
3067 SmallPtrSet<Value *, 4> Visited;
3068 SmallVector<Value *, 4> Worklist;
3071 Value *P = Worklist.pop_back_val();
3096 for (Value *IncValue : PN->incoming_values())
3106 bool llvm::onlyUsedByLifetimeMarkers(const Value *V) {
3118 static bool isDereferenceableFromAttribute(const Value *BV, APInt Offset,
3163 static bool isDereferenceableFromAttribute(const Value *V, const DataLayout &DL,
3176 static bool isAligned(const Value *Base, APInt Offset, unsigned Align,
3193 static bool isAligned(const Value *Base, unsigned Align, const DataLayout &DL) {
3203 const Value *V, unsigned Align, const DataLayout &DL,
3205 const TargetLibraryInfo *TLI, SmallPtrSetImpl<const Value *> &Visited) {
3247 const Value *Base = GEP->getPointerOperand();
3286 bool llvm::isDereferenceableAndAlignedPointer(const Value *V, unsigned Align,
3304 const Value *BV = V->stripAndAccumulateInBoundsConstantOffsets(DL, Offset);
3312 SmallPtrSet<const Value *, 32> Visited;
3317 bool llvm::isDereferenceablePointer(const Value *V, const DataLayout &DL,
3324 bool llvm::isSafeToSpeculativelyExecute(const Value *V,
3451 /// Return true if we know that the specified value is never null.
3452 bool llvm::isKnownNonNull(const Value *V, const TargetLibraryInfo *TLI) {
3484 static bool isKnownNonNullFromDominatingCondition(const Value *V,
3532 bool llvm::isKnownNonNullAt(const Value *V, const Instruction *CtxI,
3540 OverflowResult llvm::computeOverflowForUnsignedMul(Value *LHS, Value *RHS,
3590 OverflowResult llvm::computeOverflowForUnsignedAdd(Value *LHS, Value *RHS,
3620 Value *LHS, Value *RHS, AddOperator *Add, const DataLayout &DL,
3672 OverflowResult llvm::computeOverflowForSignedAdd(Value *LHS, Value *RHS,
3717 // is not any particular value, so xor or subtraction of poison with
3728 // Left shift *by* a poison value is poison. The number of
3737 // value.
3756 for (Value *V : OBO->operands()) {
3781 const Value *llvm::getGuaranteedNonFullPoisonOp(const Instruction *I) {
3818 SmallSet<const Value *, 16> YieldsPoison;
3824 const Value *NotPoison = getGuaranteedNonFullPoisonOp(&*I);
3842 static bool isKnownNonNaN(Value *V, FastMathFlags FMF) {
3851 static bool isKnownNonZero(Value *V) {
3859 Value *CmpLHS, Value *CmpRHS,
3860 Value *TrueVal, Value *FalseVal,
3861 Value *&LHS, Value *&RHS) {
3989 static Value *lookThroughCast(CmpInst *CmpI, Value *V1, Value *V2,
4011 // This is only valid if the truncated value can be sign-extended
4012 // back to the original value.
4044 SelectPatternResult llvm::matchSelectPattern(Value *V,
4045 Value *&LHS, Value *&RHS,
4054 Value *CmpLHS = CmpI->getOperand(0);
4055 Value *CmpRHS = CmpI->getOperand(1);
4056 Value *TrueVal = SI->getTrueValue();
4057 Value *FalseVal = SI->getFalseValue();
4068 if (Value *C = lookThroughCast(CmpI, TrueVal, FalseVal, CastOp))
4072 if (Value *C = lookThroughCast(CmpI, FalseVal, TrueVal, CastOp))
4104 static bool isTruePredicate(CmpInst::Predicate Pred, Value *LHS, Value *RHS,
4133 auto MatchNUWAddsToSameValue = [&](Value *A, Value *B, Value *&X,
4153 Value *X;
4165 static bool isImpliedCondOperands(CmpInst::Predicate Pred, Value *ALHS,
4166 Value *ARHS, Value *BLHS, Value *BRHS,
4190 bool llvm::isImpliedCondition(Value *LHS, Value *RHS, const DataLayout &DL,
4207 Value *ALHS, *ARHS;
4208 Value *BLHS, *BRHS;