Home
last modified time | relevance | path

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

123

/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/IR/
H A DConstantRange.h324 ConstantRange intersectWith(const ConstantRange &CR,
332 ConstantRange unionWith(const ConstantRange &CR,
395 ConstantRange add(const ConstantRange &Other) const;
407 ConstantRange sub(const ConstantRange &Other) const;
429 ConstantRange smax(const ConstantRange &Other) const;
433 ConstantRange umax(const ConstantRange &Other) const;
437 ConstantRange smin(const ConstantRange &Other) const;
441 ConstantRange umin(const ConstantRange &Other) const;
446 ConstantRange udiv(const ConstantRange &Other) const;
453 ConstantRange sdiv(const ConstantRange &Other) const;
[all …]
H A DGlobalValue.h35 class ConstantRange; variable
645 std::optional<ConstantRange> getAbsoluteSymbolRange() const;
H A DModuleSummaryIndex.h783 ConstantRange Offsets{/*BitWidth=*/RangeWidth, /*isFullSet=*/true};
786 Call(uint64_t ParamNo, ValueInfo Callee, const ConstantRange &Offsets)
795 ConstantRange Use{/*BitWidth=*/RangeWidth, /*isFullSet=*/true};
803 ParamAccess(uint64_t ParamNo, const ConstantRange &Use)
/freebsd-14.2/contrib/llvm-project/llvm/lib/IR/
H A DConstantRange.cpp48 ConstantRange::ConstantRange(APInt V) in ConstantRange() function in ConstantRange
51 ConstantRange::ConstantRange(APInt L, APInt U) in ConstantRange() function in ConstantRange
500 ConstantRange ConstantRange::difference(const ConstantRange &CR) const { in difference()
524 ConstantRange ConstantRange::intersectWith(const ConstantRange &CR, in intersectWith()
630 ConstantRange ConstantRange::unionWith(const ConstantRange &CR, in unionWith()
1025 ConstantRange ConstantRange::addWithNoWrap(const ConstantRange &Other, in addWithNoWrap()
1072 ConstantRange ConstantRange::subWithNoWrap(const ConstantRange &Other, in subWithNoWrap()
1266 ConstantRange ConstantRange::sdiv(const ConstantRange &RHS) const { in sdiv()
1354 ConstantRange ConstantRange::urem(const ConstantRange &RHS) const { in urem()
1376 ConstantRange ConstantRange::srem(const ConstantRange &RHS) const { in srem()
[all …]
H A DMetadata.cpp1233 static bool isContiguous(const ConstantRange &A, const ConstantRange &B) { in isContiguous()
1237 static bool canBeMerged(const ConstantRange &A, const ConstantRange &B) { in canBeMerged()
1243 ConstantRange NewRange(Low->getValue(), High->getValue()); in tryMergeRange()
1247 ConstantRange LastRange(LB, LE); in tryMergeRange()
1249 ConstantRange Union = LastRange.unionWith(NewRange); in tryMergeRange()
1330 ConstantRange Range(EndPoints[0]->getValue(), EndPoints[1]->getValue()); in getMostGenericRange()
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DFloat2Int.h40 void seen(Instruction *I, ConstantRange R);
41 ConstantRange badRange();
42 ConstantRange unknownRange();
43 ConstantRange validateRange(ConstantRange R);
44 std::optional<ConstantRange> calcRange(Instruction *I);
51 MapVector<Instruction *, ConstantRange> SeenInsts;
/freebsd-14.2/contrib/llvm-project/llvm/lib/Analysis/
H A DStackSafetyAnalysis.cpp74 bool isUnsafe(const ConstantRange &R) { in isUnsafe()
78 ConstantRange addOverflowNever(const ConstantRange &L, const ConstantRange &R) { in addOverflowNever()
84 ConstantRange Result = L.add(R); in addOverflowNever()
89 ConstantRange unionNoWrap(const ConstantRange &L, const ConstantRange &R) { in unionNoWrap()
120 ConstantRange Range;
159 ConstantRange R = ConstantRange::getEmpty(PointerSize); in getStaticAllocaSizeRange()
244 const ConstantRange UnknownRange;
288 ConstantRange
568 const ConstantRange UnknownRange;
602 const ConstantRange &Offsets) const { in getArgumentAccessRange()
[all …]
H A DLazyValueInfo.cpp124 ConstantRange Range = in intersect()
418 std::function<ConstantRange(const ConstantRange &, const ConstantRange &)>
930 std::optional<ConstantRange>
976 std::function<ConstantRange(const ConstantRange &, const ConstantRange &)> in solveBlockValueBinaryOpImpl() argument
1008 [BO, NoWrapKind](const ConstantRange &CR1, const ConstantRange &CR2) { in solveBlockValueBinaryOp()
1014 BO, BB, [BO](const ConstantRange &CR1, const ConstantRange &CR2) { in solveBlockValueBinaryOp()
1023 WO, BB, [WO](const ConstantRange &CR1, const ConstantRange &CR2) { in solveBlockValueOverflowIntrinsic()
1124 ConstantRange TrueValues = in getValueFromSimpleICmpCondition()
1210 ConstantRange CR = ConstantRange::makeExactICmpRegion(EdgePred, *C); in getValueFromICmpCondition()
1250 ConstantRange NWR = ConstantRange::makeExactNoWrapRegion( in getValueFromOverflowCondition()
[all …]
H A DValueTracking.cpp553 ConstantRange TrueValues = ConstantRange::makeExactICmpRegion(Pred, *C); in cmpExcludesZero()
563 ConstantRange TrueValues = ConstantRange::makeExactICmpRegion( in cmpExcludesZero()
6286 ConstantRange
6290 ConstantRange CR1 = in computeConstantRangeIncludingKnownBits()
6294 ForSigned ? ConstantRange::Signed : ConstantRange::Unsigned; in computeConstantRangeIncludingKnownBits()
6303 ConstantRange LHSRange = ConstantRange::fromKnownBits(LHSKnown, false); in computeOverflowForUnsignedMul()
6304 ConstantRange RHSRange = ConstantRange::fromKnownBits(RHSKnown, false); in computeOverflowForUnsignedMul()
8291 ConstantRange DomCR = ConstantRange::makeExactICmpRegion(LPred, LC); in isImpliedCondCommonOperandWithConstants()
8292 ConstantRange CR = ConstantRange::makeExactICmpRegion(RPred, RC); in isImpliedCondCommonOperandWithConstants()
8891 ConstantRange CR = ConstantRange::getEmpty(BitWidth); in computeConstantRange()
[all …]
H A DBasicAliasAnalysis.cpp312 ConstantRange evaluateWith(ConstantRange N) const { in evaluateWith()
1172 ConstantRange OffsetRange = ConstantRange(DecompGEP1.Offset); in aliasGEP()
1186 ConstantRange CR = computeConstantRange(Index.Val.V, /* ForSigned */ false, in aliasGEP()
1191 ConstantRange::fromKnownBits(Known, /* Signed */ true), in aliasGEP()
1192 ConstantRange::Signed); in aliasGEP()
1198 CR = CR.smul_sat(ConstantRange(Scale)); in aliasGEP()
1200 CR = CR.smul_fast(ConstantRange(Scale)); in aliasGEP()
1224 ConstantRange Range1 = OffsetRange.add( in aliasGEP()
1225 ConstantRange(APInt(BW, 0), APInt(BW, V1Size.getValue()))); in aliasGEP()
1226 ConstantRange Range2 = in aliasGEP()
[all …]
H A DScalarEvolution.cpp3286 ConstantRange NSWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in getMulExpr()
6400 ConstantRange ScalarEvolution::
6519 const ConstantRange &
7213 ConstantRange TrueRange = in getRangeViaFactoring()
7215 ConstantRange FalseRange = in getRangeViaFactoring()
8148 ConstantRange ExitCountRange = in getTripCountFromExitCount()
8964 ConstantRange NWR = in computeExitLimitFromCondImpl()
9121 ConstantRange CompRange = in computeExitLimitFromICmp()
10624 ConstantRange ExactCR = ConstantRange::makeExactICmpRegion(Pred, RA); in SimplifyICmpOperands()
12576 ConstantRange FoundLHSRange = in isImpliedCondOperandsViaRanges()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DValueLattice.h90 ConstantRange Range;
104 Range.~ConstantRange(); in destroy()
157 new (&Range) ConstantRange(Other.Range); in ValueLatticeElement()
176 new (&Range) ConstantRange(std::move(Other.Range)); in ValueLatticeElement()
214 static ValueLatticeElement getRange(ConstantRange CR,
269 const ConstantRange &getConstantRange(bool UndefAllowed = true) const {
312 ConstantRange(CI->getValue()),
325 ConstantRange(CI->getValue() + 1, CI->getValue())); in markNotConstant()
347 bool markConstantRange(ConstantRange NewR,
379 new (&Range) ConstantRange(std::move(NewR));
[all …]
H A DLazyValueInfo.h23 class ConstantRange; variable
94 ConstantRange getConstantRange(Value *V, Instruction *CxtI,
99 ConstantRange getConstantRangeAtUse(const Use &U, bool UndefAllowed);
109 ConstantRange getConstantRangeOnEdge(Value *V, BasicBlock *FromBB,
H A DScalarEvolution.h978 ConstantRange getUnsignedRange(const SCEV *S) {
994 ConstantRange getSignedRange(const SCEV *S) {
1635 DenseMap<const SCEV *, ConstantRange> UnsignedRanges;
1638 DenseMap<const SCEV *, ConstantRange> SignedRanges;
1644 const ConstantRange &setRange(const SCEV *S, RangeSignHint Hint,
1645 ConstantRange CR) {
1646 DenseMap<const SCEV *, ConstantRange> &Cache =
1658 const ConstantRange &getRangeRef(const SCEV *S, RangeSignHint Hint,
1667 ConstantRange getRangeForAffineAR(const SCEV *Start, const SCEV *Step,
1680 ConstantRange getRangeViaFactoring(const SCEV *Start, const SCEV *Step,
[all …]
H A DValueTracking.h860 ConstantRange getVScaleRange(const Function *F, unsigned BitWidth);
864 ConstantRange computeConstantRange(const Value *V, bool ForSigned,
872 ConstantRange
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DCorrelatedValuePropagation.cpp423 ConstantRange LRange = in willNotOverflow()
425 ConstantRange RRange = in willNotOverflow()
427 ConstantRange NWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in willNotOverflow()
986 ConstantRange LCR = in processSDivOrSRem()
989 ConstantRange RCR = in processSDivOrSRem()
1007 ConstantRange LRange = in processAShr()
1088 ConstantRange LRange = in processBinOp()
1090 ConstantRange RRange = in processBinOp()
1096 ConstantRange NUWRange = ConstantRange::makeGuaranteedNoWrapRegion( in processBinOp()
1102 ConstantRange NSWRange = ConstantRange::makeGuaranteedNoWrapRegion( in processBinOp()
[all …]
H A DFloat2Int.cpp116 void Float2IntPass::seen(Instruction *I, ConstantRange R) { in seen()
126 ConstantRange Float2IntPass::badRange() { in badRange()
127 return ConstantRange::getFull(MaxIntegerBW + 1); in badRange()
129 ConstantRange Float2IntPass::unknownRange() { in unknownRange()
130 return ConstantRange::getEmpty(MaxIntegerBW + 1); in unknownRange()
132 ConstantRange Float2IntPass::validateRange(ConstantRange R) { in validateRange()
174 auto Input = ConstantRange::getFull(BW); in walkBackwards()
208 SmallVector<ConstantRange, 4> OpRanges; in calcRange()
247 OpRanges.push_back(ConstantRange(Int)); in calcRange()
263 auto Zero = ConstantRange(APInt::getZero(Size)); in calcRange()
[all …]
H A DGuardWidening.cpp735 ConstantRange CR0 = in mergeChecks()
736 ConstantRange::makeExactICmpRegion(Pred0, RHS0->getValue()); in mergeChecks()
737 ConstantRange CR1 = in mergeChecks()
738 ConstantRange::makeExactICmpRegion(Pred1, RHS1->getValue()); in mergeChecks()
743 if (std::optional<ConstantRange> Intersect = in mergeChecks()
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSCCPSolver.cpp50 return ConstantRange::getFull(Ty->getScalarSizeInBits()); in getConstantRange()
113 return ConstantRange(Const->getValue()); in refineInstruction()
116 return ConstantRange::getFull(Bitwidth); in refineInstruction()
1263 ConstantRange Res = in visitCastInst()
1282 ConstantRange LR = getConstantRange(L, Ty); in handleExtractOfWithOverflow()
1283 ConstantRange RR = getConstantRange(R, Ty); in handleExtractOfWithOverflow()
1285 ConstantRange Res = LR.binaryOp(WO->getBinaryOp(), RR); in handleExtractOfWithOverflow()
1289 ConstantRange NWRegion = ConstantRange::makeGuaranteedNoWrapRegion( in handleExtractOfWithOverflow()
1487 ConstantRange A = getConstantRange(V1State, I.getType()); in visitBinaryOperator()
1800 SmallVector<ConstantRange, 2> OpRanges; in handleCallResult()
[all …]
H A DLowerSwitch.cpp413 ConstantRange KnownBitsRange = in ProcessSwitchInst()
414 ConstantRange::fromKnownBits(Known, /*IsSigned=*/false); in ProcessSwitchInst()
415 const ConstantRange LVIRange = in ProcessSwitchInst()
417 ConstantRange ValRange = KnownBitsRange.intersectWith(LVIRange); in ProcessSwitchInst()
H A DSimplifyIndVar.cpp806 ConstantRange IVRange = SE->getUnsignedRange(SE->getSCEV(IVOperand)); in strengthenRightShift()
1062 DenseMap<DefUserPair, ConstantRange> PostIncRangeInfos;
1064 std::optional<ConstantRange> getPostIncRangeInfo(Value *Def, in getPostIncRangeInfo()
1069 ? std::optional<ConstantRange>(std::nullopt) in getPostIncRangeInfo()
1070 : std::optional<ConstantRange>(It->second); in getPostIncRangeInfo()
1076 void updatePostIncRangeInfo(Value *Def, Instruction *UseI, ConstantRange R) { in updatePostIncRangeInfo()
2047 ConstantRange::makeAllowedICmpRegion(P, CmpRHSRange); in calculatePostIncRange()
/freebsd-14.2/contrib/llvm-project/llvm/lib/CodeGen/
H A DSafeStack.cpp232 ConstantRange AccessStartRange = SE.getUnsignedRange(Expr); in IsAccessSafe()
233 ConstantRange SizeRange = in IsAccessSafe()
234 ConstantRange(APInt(BitWidth, 0), APInt(BitWidth, AccessSize)); in IsAccessSafe()
235 ConstantRange AccessRange = AccessStartRange.add(SizeRange); in IsAccessSafe()
236 ConstantRange AllocaRange = in IsAccessSafe()
237 ConstantRange(APInt(BitWidth, 0), APInt(BitWidth, AllocaSize)); in IsAccessSafe()
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/Transforms/IPO/
H A DAttributor.h2934 ConstantRange Assumed;
2937 ConstantRange Known;
2941 Known(ConstantRange::getFull(BitWidth)) {}
2943 IntegerRangeState(const ConstantRange &CR)
2949 return ConstantRange::getFull(BitWidth);
2954 return ConstantRange::getEmpty(BitWidth);
2984 ConstantRange getKnown() const { return Known; }
2990 void unionAssumed(const ConstantRange &R) {
3001 void intersectKnown(const ConstantRange &R) {
4909 virtual ConstantRange
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Target/AMDGPU/
H A DAMDGPUMachineFunction.cpp187 std::optional<ConstantRange> AbsSymRange = GV.getAbsoluteSymbolRange(); in getLDSAbsoluteAddress()
H A DAMDGPUAttributor.cpp767 ConstantRange(APInt(32, MinGroupSize), APInt(32, MaxGroupSize + 1))); in initialize()
839 ConstantRange Range(APInt(32, Min), APInt(32, Max + 1)); in initialize()
871 ConstantRange CallerRange(APInt(32, Min), APInt(32, Max + 1)); in updateImpl()

123