@@ -45,6 +45,10 @@ template <typename T> class ArrayRef;
45
45
46
46
constexpr unsigned MaxAnalysisRecursionDepth = 6 ;
47
47
48
+ // / The max limit of the search depth in DecomposeGEPExpression() and
49
+ // / getUnderlyingObject().
50
+ constexpr unsigned MaxLookupSearchDepth = 6 ;
51
+
48
52
// / Determine which bits of V are known to be either zero or one and return
49
53
// / them in the KnownZero/KnownOne bit sets.
50
54
// /
@@ -432,9 +436,10 @@ LLVM_ABI bool isIntrinsicReturningPointerAliasingArgumentWithoutCapturing(
432
436
// / original object being addressed. Note that the returned value has pointer
433
437
// / type if the specified value does. If the \p MaxLookup value is non-zero, it
434
438
// / limits the number of instructions to be stripped off.
435
- LLVM_ABI const Value *getUnderlyingObject (const Value *V,
436
- unsigned MaxLookup = 6 );
437
- inline Value *getUnderlyingObject (Value *V, unsigned MaxLookup = 6 ) {
439
+ LLVM_ABI const Value *
440
+ getUnderlyingObject (const Value *V, unsigned MaxLookup = MaxLookupSearchDepth);
441
+ inline Value *getUnderlyingObject (Value *V,
442
+ unsigned MaxLookup = MaxLookupSearchDepth) {
438
443
// Force const to avoid infinite recursion.
439
444
const Value *VConst = V;
440
445
return const_cast <Value *>(getUnderlyingObject (VConst, MaxLookup));
@@ -475,7 +480,7 @@ LLVM_ABI const Value *getUnderlyingObjectAggressive(const Value *V);
475
480
LLVM_ABI void getUnderlyingObjects (const Value *V,
476
481
SmallVectorImpl<const Value *> &Objects,
477
482
const LoopInfo *LI = nullptr ,
478
- unsigned MaxLookup = 6 );
483
+ unsigned MaxLookup = MaxLookupSearchDepth );
479
484
480
485
// / This is a wrapper around getUnderlyingObjects and adds support for basic
481
486
// / ptrtoint+arithmetic+inttoptr sequences.
0 commit comments