Home
last modified time | relevance | path

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

12

/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/IR/
H A 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 …]
H A DGlobalValue.h35 class ConstantRange; variable
562 Optional<ConstantRange> getAbsoluteSymbolRange() const;
H A DModuleSummaryIndex.h585 ConstantRange Offsets{/*BitWidth=*/RangeWidth, /*isFullSet=*/true};
588 Call(uint64_t ParamNo, ValueInfo Callee, const ConstantRange &Offsets)
597 ConstantRange Use{/*BitWidth=*/RangeWidth, /*isFullSet=*/true};
605 ParamAccess(uint64_t ParamNo, const ConstantRange &Use)
/netbsd-src/external/apache2/llvm/dist/llvm/lib/IR/
H A 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 …]
H A DMetadata.cpp978 static bool isContiguous(const ConstantRange &A, const ConstantRange &B) { in isContiguous()
982 static bool canBeMerged(const ConstantRange &A, const ConstantRange &B) { in canBeMerged()
988 ConstantRange NewRange(Low->getValue(), High->getValue()); in tryMergeRange()
992 ConstantRange LastRange(LB, LE); in tryMergeRange()
994 ConstantRange Union = LastRange.unionWith(NewRange); in tryMergeRange()
1075 ConstantRange Range(EndPoints[0]->getValue(), EndPoints[1]->getValue()); in getMostGenericRange()
H A DCMakeLists.txt11 ConstantRange.cpp
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/
H A 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 …]
H A DLazyValueInfo.cpp124 ConstantRange Range = in intersect()
413 Optional<ConstantRange> getRangeFor(Value *V, Instruction *CxtI,
417 std::function<ConstantRange(const ConstantRange &,
418 const ConstantRange &)> OpFn);
811 const ConstantRange &TrueCR = TrueVal.getConstantRange(); in solveBlockValueSelect()
812 const ConstantRange &FalseCR = FalseVal.getConstantRange(); in solveBlockValueSelect()
820 ConstantRange ResultCR = [&]() { in solveBlockValueSelect()
849 ConstantRange Zero(APInt::getNullValue(TrueCR.getBitWidth())); in solveBlockValueSelect()
873 Optional<ConstantRange> LazyValueInfoImpl::getRangeFor(Value *V, in getRangeFor()
886 return ConstantRange::getFull(OperandBitWidth); in getRangeFor()
[all …]
H A DScalarEvolution.cpp1603 ConstantRange CR = getUnsignedRange(X); in getZeroExtendExpr()
1910 ConstantRange CR = getSignedRange(X); in getSignExtendExpr()
2290 auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in StrengthenNoWrapFlags()
2298 auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in StrengthenNoWrapFlags()
4436 ConstantRange AddRecRange = getSignedRange(AR); in proveNoWrapViaConstantRanges()
4437 ConstantRange IncRange = getSignedRange(AR->getStepRecurrence(*this)); in proveNoWrapViaConstantRanges()
4439 auto NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in proveNoWrapViaConstantRanges()
4446 ConstantRange AddRecRange = getUnsignedRange(AR); in proveNoWrapViaConstantRanges()
4447 ConstantRange IncRange = getUnsignedRange(AR->getStepRecurrence(*this)); in proveNoWrapViaConstantRanges()
4449 auto NUWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in proveNoWrapViaConstantRanges()
[all …]
H A DValueTracking.cpp466 ConstantRange Range(Lower->getValue(), Upper->getValue()); in computeKnownBitsFromRangeMetadata()
583 ConstantRange TrueValues = ConstantRange::makeExactICmpRegion(Pred, *C); in cmpExcludesZero()
2195 ConstantRange Range(Lower->getValue(), Upper->getValue()); in rangeMetadataExcludesValue()
4631 static OverflowResult mapOverflowResult(ConstantRange::OverflowResult OR) { in mapOverflowResult()
4633 case ConstantRange::OverflowResult::MayOverflow: in mapOverflowResult()
4635 case ConstantRange::OverflowResult::AlwaysOverflowsLow: in mapOverflowResult()
4637 case ConstantRange::OverflowResult::AlwaysOverflowsHigh: in mapOverflowResult()
4639 case ConstantRange::OverflowResult::NeverOverflows: in mapOverflowResult()
4646 static ConstantRange computeConstantRangeIncludingKnownBits( in computeConstantRangeIncludingKnownBits()
4652 ConstantRange CR1 = ConstantRange::fromKnownBits(Known, ForSigned); in computeConstantRangeIncludingKnownBits()
[all …]
H A DLoads.cpp464 ConstantRange LoadRange(LoadOffset, in areNonOverlapSameBaseLoadAndStore()
466 ConstantRange StoreRange(StoreOffset, in areNonOverlapSameBaseLoadAndStore()
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/
H A DFloat2Int.cpp149 void Float2IntPass::seen(Instruction *I, ConstantRange R) { in seen()
159 ConstantRange Float2IntPass::badRange() { in badRange()
160 return ConstantRange::getFull(MaxIntegerBW + 1); in badRange()
162 ConstantRange Float2IntPass::unknownRange() { in unknownRange()
163 return ConstantRange::getEmpty(MaxIntegerBW + 1); in unknownRange()
165 ConstantRange Float2IntPass::validateRange(ConstantRange R) { in validateRange()
207 auto Input = ConstantRange::getFull(BW); in walkBackwards()
246 std::function<ConstantRange(ArrayRef<ConstantRange>)> Op; in walkForwards()
255 Op = [](ArrayRef<ConstantRange> Ops) { in walkForwards()
258 auto Zero = ConstantRange(APInt::getNullValue(Size)); in walkForwards()
[all …]
H A DCorrelatedValuePropagation.cpp392 ConstantRange LRange = LVI->getConstantRange(BO->getLHS(), BO); in willNotOverflow()
393 ConstantRange RRange = LVI->getConstantRange(BO->getRHS(), BO); in willNotOverflow()
394 ConstantRange NWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in willNotOverflow()
684 std::array<Optional<ConstantRange>, 2> CRs; in narrowSDivOrSRem()
739 ConstantRange CR = LVI->getConstantRange(Operand, Instr); in processUDivOrURem()
945 ConstantRange LRange = LVI->getConstantRange(LHS, BinOp); in processBinOp()
946 ConstantRange RRange = LVI->getConstantRange(RHS, BinOp); in processBinOp()
951 ConstantRange NUWRange = ConstantRange::makeGuaranteedNoWrapRegion( in processBinOp()
957 ConstantRange NSWRange = ConstantRange::makeGuaranteedNoWrapRegion( in processBinOp()
981 ConstantRange LRange = in processAnd()
H A DGuardWidening.cpp512 ConstantRange CR0 = in widenCondCommon()
513 ConstantRange::makeExactICmpRegion(Pred0, RHS0->getValue()); in widenCondCommon()
514 ConstantRange CR1 = in widenCondCommon()
515 ConstantRange::makeExactICmpRegion(Pred1, RHS1->getValue()); in widenCondCommon()
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Transforms/Scalar/
H A DFloat2Int.h35 void seen(Instruction *I, ConstantRange R);
36 ConstantRange badRange();
37 ConstantRange unknownRange();
38 ConstantRange validateRange(ConstantRange R);
45 MapVector<Instruction *, ConstantRange> SeenInsts;
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Analysis/
H A 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 …]
H A DLazyValueInfo.h23 class ConstantRange; variable
95 ConstantRange getConstantRange(Value *V, Instruction *CxtI,
106 ConstantRange getConstantRangeOnEdge(Value *V, BasicBlock *FromBB,
H A DScalarEvolution.h851 ConstantRange getUnsignedRange(const SCEV *S) {
867 ConstantRange getSignedRange(const SCEV *S) {
1529 DenseMap<const SCEV *, ConstantRange> UnsignedRanges;
1532 DenseMap<const SCEV *, ConstantRange> SignedRanges;
1538 const ConstantRange &setRange(const SCEV *S, RangeSignHint Hint,
1539 ConstantRange CR) {
1540 DenseMap<const SCEV *, ConstantRange> &Cache =
1552 const ConstantRange &getRangeRef(const SCEV *S, RangeSignHint Hint);
1556 ConstantRange getRangeForAffineAR(const SCEV *Start, const SCEV *Stop,
1561 ConstantRange getRangeForAffineNoSelfWrappingAR(const SCEVAddRecExpr *AddRec,
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/
H A DSCCPSolver.cpp600 const ConstantRange &Range = SCValue.getConstantRange(); in getFeasibleSuccessors()
784 ConstantRange OpRange = OpSt.getConstantRange(); in visitCastInst()
796 ConstantRange Res = in visitCastInst()
969 ConstantRange A = ConstantRange::getFull(I.getType()->getScalarSizeInBits()); in visitBinaryOperator()
970 ConstantRange B = ConstantRange::getFull(I.getType()->getScalarSizeInBits()); in visitBinaryOperator()
976 ConstantRange R = A.binaryOp(cast<BinaryOperator>(&I)->getOpcode(), B); in visitBinaryOperator()
1261 ConstantRange::getFull(DL.getTypeSizeInBits(CopyOf->getType())); in handleCallResult()
1265 ImposedCR = ConstantRange::makeAllowedICmpRegion( in handleCallResult()
1272 : ConstantRange::getFull( in handleCallResult()
1303 if (ConstantRange::isIntrinsicSupported(II->getIntrinsicID())) { in handleCallResult()
[all …]
H A DLowerSwitch.cpp401 ConstantRange KnownBitsRange = in ProcessSwitchInst()
402 ConstantRange::fromKnownBits(Known, /*IsSigned=*/false); in ProcessSwitchInst()
403 const ConstantRange LVIRange = LVI->getConstantRange(Val, SI); in ProcessSwitchInst()
404 ConstantRange ValRange = KnownBitsRange.intersectWith(LVIRange); in ProcessSwitchInst()
H A DSimplifyIndVar.cpp798 ConstantRange IVRange = SE->getUnsignedRange(SE->getSCEV(IVOperand)); in strengthenRightShift()
1038 DenseMap<DefUserPair, ConstantRange> PostIncRangeInfos;
1040 Optional<ConstantRange> getPostIncRangeInfo(Value *Def, in getPostIncRangeInfo()
1045 ? Optional<ConstantRange>(None) in getPostIncRangeInfo()
1046 : Optional<ConstantRange>(It->second); in getPostIncRangeInfo()
1052 void updatePostIncRangeInfo(Value *Def, Instruction *UseI, ConstantRange R) { in updatePostIncRangeInfo()
2005 ConstantRange::makeAllowedICmpRegion(P, CmpRHSRange); in calculatePostIncRange()
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Transforms/IPO/
H A DAttributor.h2096 ConstantRange Assumed;
2099 ConstantRange Known;
2102 : BitWidth(BitWidth), Assumed(ConstantRange::getEmpty(BitWidth)),
2103 Known(ConstantRange::getFull(BitWidth)) {}
2105 IntegerRangeState(const ConstantRange &CR)
2110 static ConstantRange getWorstState(uint32_t BitWidth) {
2111 return ConstantRange::getFull(BitWidth);
2115 static ConstantRange getBestState(uint32_t BitWidth) {
2116 return ConstantRange::getEmpty(BitWidth);
2118 static ConstantRange getBestState(const IntegerRangeState &IRS) {
[all …]
/netbsd-src/external/apache2/llvm/dist/llvm/lib/CodeGen/
H A DSafeStack.cpp241 ConstantRange AccessStartRange = SE.getUnsignedRange(Expr); in IsAccessSafe()
242 ConstantRange SizeRange = in IsAccessSafe()
243 ConstantRange(APInt(BitWidth, 0), APInt(BitWidth, AccessSize)); in IsAccessSafe()
244 ConstantRange AccessRange = AccessStartRange.add(SizeRange); in IsAccessSafe()
245 ConstantRange AllocaRange = in IsAccessSafe()
246 ConstantRange(APInt(BitWidth, 0), APInt(BitWidth, AllocaSize)); in IsAccessSafe()
/netbsd-src/external/apache2/llvm/lib/libLLVMIR/
H A DMakefile20 ConstantRange.cpp \
/netbsd-src/external/apache2/llvm/dist/llvm/utils/gn/secondary/llvm/lib/IR/
H A DBUILD.gn26 "ConstantRange.cpp",

12