Home
last modified time | relevance | path

Searched refs:ConstantRange (Results 1 – 25 of 107) sorted by relevance

12345

/external/llvm-project/llvm/include/llvm/IR/
DConstantRange.h47 class LLVM_NODISCARD ConstantRange {
51 ConstantRange getEmpty() const { in getEmpty()
52 return ConstantRange(getBitWidth(), false); in getEmpty()
56 ConstantRange getFull() const { in getFull()
57 return ConstantRange(getBitWidth(), true); in getFull()
62 explicit ConstantRange(uint32_t BitWidth, bool isFullSet);
65 ConstantRange(APInt Value);
70 ConstantRange(APInt Lower, APInt Upper);
73 static ConstantRange getEmpty(uint32_t BitWidth) { in getEmpty()
74 return ConstantRange(BitWidth, false); in getEmpty()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/IR/
DConstantRange.h47 class LLVM_NODISCARD ConstantRange {
51 ConstantRange getEmpty() const { in getEmpty()
52 return ConstantRange(getBitWidth(), false); in getEmpty()
56 ConstantRange getFull() const { in getFull()
57 return ConstantRange(getBitWidth(), true); in getFull()
62 explicit ConstantRange(uint32_t BitWidth, bool isFullSet);
65 ConstantRange(APInt Value);
70 ConstantRange(APInt Lower, APInt Upper);
73 static ConstantRange getEmpty(uint32_t BitWidth) { in getEmpty()
74 return ConstantRange(BitWidth, false); in getEmpty()
[all …]
/external/llvm/include/llvm/IR/
DConstantRange.h43 class ConstantRange {
52 explicit ConstantRange(uint32_t BitWidth, bool isFullSet = true);
56 ConstantRange(APIntMoveTy Value);
61 ConstantRange(APIntMoveTy Lower, APIntMoveTy Upper);
71 static ConstantRange makeAllowedICmpRegion(CmpInst::Predicate Pred,
72 const ConstantRange &Other);
82 static ConstantRange makeSatisfyingICmpRegion(CmpInst::Predicate Pred,
83 const ConstantRange &Other);
92 static ConstantRange makeExactICmpRegion(CmpInst::Predicate Pred,
113 static ConstantRange makeGuaranteedNoWrapRegion(Instruction::BinaryOps BinOp,
[all …]
/external/llvm/lib/IR/
DConstantRange.cpp34 ConstantRange::ConstantRange(uint32_t BitWidth, bool Full) { in ConstantRange() function in ConstantRange
43 ConstantRange::ConstantRange(APIntMoveTy V) in ConstantRange() function in ConstantRange
46 ConstantRange::ConstantRange(APIntMoveTy L, APIntMoveTy U) in ConstantRange() function in ConstantRange
54 ConstantRange ConstantRange::makeAllowedICmpRegion(CmpInst::Predicate Pred, in makeAllowedICmpRegion()
55 const ConstantRange &CR) { in makeAllowedICmpRegion()
67 return ConstantRange(CR.getUpper(), CR.getLower()); in makeAllowedICmpRegion()
68 return ConstantRange(W); in makeAllowedICmpRegion()
72 return ConstantRange(W, /* empty */ false); in makeAllowedICmpRegion()
73 return ConstantRange(APInt::getMinValue(W), UMax); in makeAllowedICmpRegion()
78 return ConstantRange(W, /* empty */ false); in makeAllowedICmpRegion()
[all …]
/external/llvm-project/llvm/unittests/IR/
DConstantRangeTest.cpp22 static ConstantRange Full;
23 static ConstantRange Empty;
24 static ConstantRange One;
25 static ConstantRange Some;
26 static ConstantRange Wrap;
38 ConstantRange CR(APInt(Bits, Lo), APInt(Bits, Hi)); in EnumerateConstantRanges()
46 EnumerateConstantRanges(Bits, [&](const ConstantRange &CR1) { in EnumerateTwoConstantRanges()
47 EnumerateConstantRanges(Bits, [&](const ConstantRange &CR2) { in EnumerateTwoConstantRanges()
54 static void ForeachNumInConstantRange(const ConstantRange &CR, Fn TestFn) { in ForeachNumInConstantRange()
64 ConstantRange getRange();
[all …]
/external/llvm/unittests/IR/
DConstantRangeTest.cpp21 static ConstantRange Full;
22 static ConstantRange Empty;
23 static ConstantRange One;
24 static ConstantRange Some;
25 static ConstantRange Wrap;
28 ConstantRange ConstantRangeTest::Full(16);
29 ConstantRange ConstantRangeTest::Empty(16, false);
30 ConstantRange ConstantRangeTest::One(APInt(16, 0xa));
31 ConstantRange ConstantRangeTest::Some(APInt(16, 0xa), APInt(16, 0xaaa));
32 ConstantRange ConstantRangeTest::Wrap(APInt(16, 0xaaa), APInt(16, 0xa));
[all …]
/external/llvm-project/llvm/lib/IR/
DConstantRange.cpp43 ConstantRange::ConstantRange(uint32_t BitWidth, bool Full) in ConstantRange() function in ConstantRange
47 ConstantRange::ConstantRange(APInt V) in ConstantRange() function in ConstantRange
50 ConstantRange::ConstantRange(APInt L, APInt U) in ConstantRange() function in ConstantRange
58 ConstantRange ConstantRange::fromKnownBits(const KnownBits &Known, in fromKnownBits()
68 return ConstantRange(Known.getMinValue(), Known.getMaxValue() + 1); in fromKnownBits()
75 return ConstantRange(Lower, Upper + 1); in fromKnownBits()
78 ConstantRange ConstantRange::makeAllowedICmpRegion(CmpInst::Predicate Pred, in makeAllowedICmpRegion()
79 const ConstantRange &CR) { in makeAllowedICmpRegion()
91 return ConstantRange(CR.getUpper(), CR.getLower()); in makeAllowedICmpRegion()
97 return ConstantRange(APInt::getMinValue(W), std::move(UMax)); in makeAllowedICmpRegion()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/IR/
DConstantRange.cpp42 ConstantRange::ConstantRange(uint32_t BitWidth, bool Full) in ConstantRange() function in ConstantRange
46 ConstantRange::ConstantRange(APInt V) in ConstantRange() function in ConstantRange
49 ConstantRange::ConstantRange(APInt L, APInt U) in ConstantRange() function in ConstantRange
57 ConstantRange ConstantRange::fromKnownBits(const KnownBits &Known, in fromKnownBits()
67 return ConstantRange(Known.getMinValue(), Known.getMaxValue() + 1); in fromKnownBits()
74 return ConstantRange(Lower, Upper + 1); in fromKnownBits()
77 ConstantRange ConstantRange::makeAllowedICmpRegion(CmpInst::Predicate Pred, in makeAllowedICmpRegion()
78 const ConstantRange &CR) { in makeAllowedICmpRegion()
90 return ConstantRange(CR.getUpper(), CR.getLower()); in makeAllowedICmpRegion()
96 return ConstantRange(APInt::getMinValue(W), std::move(UMax)); in makeAllowedICmpRegion()
[all …]
/external/llvm/include/llvm/Transforms/Scalar/
DFloat2Int.h34 ConstantRange seen(Instruction *I, ConstantRange R);
35 ConstantRange badRange();
36 ConstantRange unknownRange();
37 ConstantRange validateRange(ConstantRange R);
44 MapVector<Instruction *, ConstantRange> SeenInsts;
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Analysis/
DValueLattice.h58 ConstantRange Range;
75 Range.~ConstantRange(); in ~ValueLatticeElement()
92 Range.~ConstantRange();
103 new (&Range) ConstantRange(Other.Range);
131 static ValueLatticeElement getRange(ConstantRange CR) { in getRange()
158 const ConstantRange &getConstantRange() const { in getConstantRange()
180 Range.~ConstantRange(); in markOverdefined()
187 markConstantRange(ConstantRange(CI->getValue())); in markConstant()
203 markConstantRange(ConstantRange(CI->getValue() + 1, CI->getValue())); in markNotConstant()
218 void markConstantRange(ConstantRange NewR) { in markConstantRange()
[all …]
DLazyValueInfo.h23 class ConstantRange; variable
88 ConstantRange getConstantRange(Value *V, BasicBlock *BB, Instruction *CxtI = nullptr);
98 ConstantRange getConstantRangeOnEdge(Value *V, BasicBlock *FromBB,
/external/llvm-project/llvm/lib/Analysis/
DStackSafetyAnalysis.cpp72 bool isUnsafe(const ConstantRange &R) { in isUnsafe()
76 ConstantRange addOverflowNever(const ConstantRange &L, const ConstantRange &R) { in addOverflowNever()
80 ConstantRange::OverflowResult::NeverOverflows) in addOverflowNever()
81 return ConstantRange::getFull(L.getBitWidth()); in addOverflowNever()
82 ConstantRange Result = L.add(R); in addOverflowNever()
87 ConstantRange unionNoWrap(const ConstantRange &L, const ConstantRange &R) { in unionNoWrap()
93 Result = ConstantRange::getFull(Result.getBitWidth()); in unionNoWrap()
118 ConstantRange Range;
125 using CallsTy = std::map<CallInfo<CalleeTy>, ConstantRange,
131 void updateRange(const ConstantRange &R) { Range = unionNoWrap(Range, R); } in updateRange()
[all …]
DLazyValueInfo.cpp124 ConstantRange Range = in intersect()
413 Optional<ConstantRange> getRangeFor(Value *V, Instruction *CxtI,
417 std::function<ConstantRange(const ConstantRange &,
418 const ConstantRange &)> OpFn);
821 const ConstantRange &TrueCR = TrueVal.getConstantRange(); in solveBlockValueSelect()
822 const ConstantRange &FalseCR = FalseVal.getConstantRange(); in solveBlockValueSelect()
830 ConstantRange ResultCR = [&]() { in solveBlockValueSelect()
859 ConstantRange Zero(APInt::getNullValue(TrueCR.getBitWidth())); in solveBlockValueSelect()
925 Optional<ConstantRange> LazyValueInfoImpl::getRangeFor(Value *V, in getRangeFor()
938 return ConstantRange::getFull(OperandBitWidth); in getRangeFor()
[all …]
/external/llvm-project/llvm/include/llvm/Transforms/Scalar/
DFloat2Int.h35 void seen(Instruction *I, ConstantRange R);
36 ConstantRange badRange();
37 ConstantRange unknownRange();
38 ConstantRange validateRange(ConstantRange R);
45 MapVector<Instruction *, ConstantRange> SeenInsts;
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Transforms/Scalar/
DFloat2Int.h35 void seen(Instruction *I, ConstantRange R);
36 ConstantRange badRange();
37 ConstantRange unknownRange();
38 ConstantRange validateRange(ConstantRange R);
45 MapVector<Instruction *, ConstantRange> SeenInsts;
/external/llvm/lib/Transforms/Scalar/
DFloat2Int.cpp140 ConstantRange Float2IntPass::seen(Instruction *I, ConstantRange R) { in seen()
150 ConstantRange Float2IntPass::badRange() { in badRange()
151 return ConstantRange(MaxIntegerBW + 1, true); in badRange()
153 ConstantRange Float2IntPass::unknownRange() { in unknownRange()
154 return ConstantRange(MaxIntegerBW + 1, false); in unknownRange()
156 ConstantRange Float2IntPass::validateRange(ConstantRange R) { in validateRange()
198 seen(I, validateRange(ConstantRange(Min, Max))); in walkBackwards()
207 seen(I, validateRange(ConstantRange(SMin, SMax))); in walkBackwards()
243 std::function<ConstantRange(ArrayRef<ConstantRange>)> Op; in walkForwards()
252 Op = [](ArrayRef<ConstantRange> Ops) { in walkForwards()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/
DStackSafetyAnalysis.cpp68 ConstantRange Offset;
69 PassAsArgInfo(const GlobalValue *Callee, size_t ParamNo, ConstantRange Offset) in PassAsArgInfo()
84 ConstantRange Range;
91 void updateRange(ConstantRange R) { Range = Range.unionWith(R); } in updateRange()
198 US.Calls.emplace_back(Aliasee, ArgNo, ConstantRange(APInt(PointerSize, 0))); in FunctionInfo()
210 const ConstantRange UnknownRange;
212 ConstantRange offsetFromAlloca(Value *Addr, const Value *AllocaPtr);
213 ConstantRange getAccessRange(Value *Addr, const Value *AllocaPtr,
215 ConstantRange getMemIntrinsicAccessRange(const MemIntrinsic *MI, const Use &U,
220 ConstantRange getRange(uint64_t Lower, uint64_t Upper) const { in getRange()
[all …]
DLazyValueInfo.cpp123 ConstantRange Range = in intersect()
427 Optional<ConstantRange> getRangeForOperand(unsigned Op, Instruction *I,
431 std::function<ConstantRange(const ConstantRange &,
432 const ConstantRange &)> OpFn);
891 const ConstantRange &TrueCR = TrueVal.getConstantRange(); in solveBlockValueSelect()
892 const ConstantRange &FalseCR = FalseVal.getConstantRange(); in solveBlockValueSelect()
900 ConstantRange ResultCR = [&]() { in solveBlockValueSelect()
930 ConstantRange Zero(APInt::getNullValue(TrueCR.getBitWidth())); in solveBlockValueSelect()
1000 Optional<ConstantRange> LazyValueInfoImpl::getRangeForOperand(unsigned Op, in getRangeForOperand()
1009 ConstantRange Range = ConstantRange::getFull(OperandBitWidth); in getRangeForOperand()
[all …]
/external/llvm-project/llvm/include/llvm/Analysis/
DValueLattice.h88 ConstantRange Range;
102 Range.~ConstantRange(); in destroy()
155 new (&Range) ConstantRange(Other.Range); in ValueLatticeElement()
174 new (&Range) ConstantRange(std::move(Other.Range)); in ValueLatticeElement()
215 static ValueLatticeElement getRange(ConstantRange CR,
270 const ConstantRange &getConstantRange(bool UndefAllowed = true) const {
313 ConstantRange(CI->getValue()),
326 ConstantRange(CI->getValue() + 1, CI->getValue())); in markNotConstant()
348 bool markConstantRange(ConstantRange NewR,
380 new (&Range) ConstantRange(std::move(NewR));
[all …]
DLazyValueInfo.h23 class ConstantRange; variable
87 ConstantRange getConstantRange(Value *V, Instruction *CxtI,
98 ConstantRange getConstantRangeOnEdge(Value *V, BasicBlock *FromBB,
/external/llvm-project/llvm/lib/Transforms/Scalar/
DFloat2Int.cpp150 void Float2IntPass::seen(Instruction *I, ConstantRange R) { in seen()
160 ConstantRange Float2IntPass::badRange() { in badRange()
161 return ConstantRange::getFull(MaxIntegerBW + 1); in badRange()
163 ConstantRange Float2IntPass::unknownRange() { in unknownRange()
164 return ConstantRange::getEmpty(MaxIntegerBW + 1); in unknownRange()
166 ConstantRange Float2IntPass::validateRange(ConstantRange R) { in validateRange()
208 auto Input = ConstantRange::getFull(BW); in walkBackwards()
247 std::function<ConstantRange(ArrayRef<ConstantRange>)> Op; in walkForwards()
256 Op = [](ArrayRef<ConstantRange> Ops) { in walkForwards()
259 auto Zero = ConstantRange(APInt::getNullValue(Size)); in walkForwards()
[all …]
DCorrelatedValuePropagation.cpp426 ConstantRange LRange = LVI->getConstantRange(BO->getLHS(), BO); in willNotOverflow()
427 ConstantRange RRange = LVI->getConstantRange(BO->getRHS(), BO); in willNotOverflow()
428 ConstantRange NWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in willNotOverflow()
632 std::array<Optional<ConstantRange>, 2> CRs; in narrowSDivOrSRem()
687 ConstantRange CR = LVI->getConstantRange(Operand, Instr); in processUDivOrURem()
896 ConstantRange LRange = LVI->getConstantRange(LHS, BinOp); in processBinOp()
897 ConstantRange RRange = LVI->getConstantRange(RHS, BinOp); in processBinOp()
902 ConstantRange NUWRange = ConstantRange::makeGuaranteedNoWrapRegion( in processBinOp()
908 ConstantRange NSWRange = ConstantRange::makeGuaranteedNoWrapRegion( in processBinOp()
932 ConstantRange LRange = in processAnd()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DFloat2Int.cpp151 void Float2IntPass::seen(Instruction *I, ConstantRange R) { in seen()
161 ConstantRange Float2IntPass::badRange() { in badRange()
162 return ConstantRange::getFull(MaxIntegerBW + 1); in badRange()
164 ConstantRange Float2IntPass::unknownRange() { in unknownRange()
165 return ConstantRange::getEmpty(MaxIntegerBW + 1); in unknownRange()
167 ConstantRange Float2IntPass::validateRange(ConstantRange R) { in validateRange()
209 auto Input = ConstantRange::getFull(BW); in walkBackwards()
248 std::function<ConstantRange(ArrayRef<ConstantRange>)> Op; in walkForwards()
257 Op = [](ArrayRef<ConstantRange> Ops) { in walkForwards()
260 auto Zero = ConstantRange(APInt::getNullValue(Size)); in walkForwards()
[all …]
DCorrelatedValuePropagation.cpp436 ConstantRange LRange = LVI->getConstantRange( in willNotOverflow()
438 ConstantRange RRange = LVI->getConstantRange( in willNotOverflow()
440 ConstantRange NWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in willNotOverflow()
629 ConstantRange OperandRange(OrigWidth, /*isFullSet=*/false); in processUDivOrURem()
761 ConstantRange LRange = LVI->getConstantRange(LHS, BB, BinOp); in processBinOp()
762 ConstantRange RRange = LVI->getConstantRange(RHS, BB, BinOp); in processBinOp()
767 ConstantRange NUWRange = ConstantRange::makeGuaranteedNoWrapRegion( in processBinOp()
773 ConstantRange NSWRange = ConstantRange::makeGuaranteedNoWrapRegion( in processBinOp()
796 ConstantRange LRange = LVI->getConstantRange(LHS, BB, BinOp); in processAnd()
/external/llvm/lib/Analysis/
DLazyValueInfo.cpp92 ConstantRange Range;
109 static LVILatticeVal getRange(ConstantRange CR) { in getRange()
136 ConstantRange getConstantRange() const { in getConstantRange()
154 return markConstantRange(ConstantRange(CI->getValue())); in markConstant()
170 return markConstantRange(ConstantRange(CI->getValue()+1, CI->getValue())); in markNotConstant()
185 bool markConstantRange(ConstantRange NewR) { in markConstantRange()
271 ConstantRange NewR = Range.unionWith(RHS.getConstantRange()); in mergeIn()
353 ConstantRange Range = in intersect()
910 ConstantRange TrueCR = TrueVal.getConstantRange(); in solveBlockValueSelect()
911 ConstantRange FalseCR = FalseVal.getConstantRange(); in solveBlockValueSelect()
[all …]

12345