Skip to content

Commit b0eb40c

Browse files
committed
[NFC] Remove unused GetUnderlyingObject paramenter
Depends on D84617. Differential Revision: https://reviews.llvm.org/D84621
1 parent 4d6eec8 commit b0eb40c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+114
-143
lines changed

llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,9 @@ inline bool ModuleHasARC(const Module &M) {
6464
/// This is a wrapper around getUnderlyingObject which also knows how to
6565
/// look through objc_retain and objc_autorelease calls, which we know to return
6666
/// their argument verbatim.
67-
inline const Value *GetUnderlyingObjCPtr(const Value *V,
68-
const DataLayout &DL) {
67+
inline const Value *GetUnderlyingObjCPtr(const Value *V) {
6968
for (;;) {
70-
V = getUnderlyingObject(V, DL);
69+
V = getUnderlyingObject(V);
7170
if (!IsForwarding(GetBasicARCInstKind(V)))
7271
break;
7372
V = cast<CallInst>(V)->getArgOperand(0);
@@ -78,12 +77,12 @@ inline const Value *GetUnderlyingObjCPtr(const Value *V,
7877

7978
/// A wrapper for GetUnderlyingObjCPtr used for results memoization.
8079
inline const Value *
81-
GetUnderlyingObjCPtrCached(const Value *V, const DataLayout &DL,
80+
GetUnderlyingObjCPtrCached(const Value *V,
8281
DenseMap<const Value *, WeakTrackingVH> &Cache) {
8382
if (auto InCache = Cache.lookup(V))
8483
return InCache;
8584

86-
const Value *Computed = GetUnderlyingObjCPtr(V, DL);
85+
const Value *Computed = GetUnderlyingObjCPtr(V);
8786
Cache[V] = const_cast<Value *>(Computed);
8887
return Computed;
8988
}

llvm/include/llvm/Analysis/ValueTracking.h

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -368,11 +368,10 @@ class Value;
368368
/// that the returned value has pointer type if the specified value does. If
369369
/// the MaxLookup value is non-zero, it limits the number of instructions to
370370
/// be stripped off.
371-
Value *getUnderlyingObject(Value *V, const DataLayout &DL,
372-
unsigned MaxLookup = 6);
373-
inline const Value *getUnderlyingObject(const Value *V, const DataLayout &DL,
371+
Value *getUnderlyingObject(Value *V, unsigned MaxLookup = 6);
372+
inline const Value *getUnderlyingObject(const Value *V,
374373
unsigned MaxLookup = 6) {
375-
return getUnderlyingObject(const_cast<Value *>(V), DL, MaxLookup);
374+
return getUnderlyingObject(const_cast<Value *>(V), MaxLookup);
376375
}
377376

378377
/// This method is similar to getUnderlyingObject except that it can
@@ -405,14 +404,12 @@ class Value;
405404
/// it shouldn't look through the phi above.
406405
void getUnderlyingObjects(const Value *V,
407406
SmallVectorImpl<const Value *> &Objects,
408-
const DataLayout &DL, LoopInfo *LI = nullptr,
409-
unsigned MaxLookup = 6);
407+
LoopInfo *LI = nullptr, unsigned MaxLookup = 6);
410408

411409
/// This is a wrapper around getUnderlyingObjects and adds support for basic
412410
/// ptrtoint+arithmetic+inttoptr sequences.
413411
bool getUnderlyingObjectsForCodeGen(const Value *V,
414-
SmallVectorImpl<Value *> &Objects,
415-
const DataLayout &DL);
412+
SmallVectorImpl<Value *> &Objects);
416413

417414
/// Finds alloca where the value comes from.
418415
AllocaInst *findAllocaForValue(Value *V);

llvm/lib/Analysis/AliasAnalysis.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,7 @@ ModRefInfo AAResults::callCapturesBefore(const Instruction *I,
641641
if (!DT)
642642
return ModRefInfo::ModRef;
643643

644-
const Value *Object =
645-
getUnderlyingObject(MemLoc.Ptr, I->getModule()->getDataLayout());
644+
const Value *Object = getUnderlyingObject(MemLoc.Ptr);
646645
if (!isIdentifiedObject(Object) || isa<GlobalValue>(Object) ||
647646
isa<Constant>(Object))
648647
return ModRefInfo::ModRef;

llvm/lib/Analysis/BasicAliasAnalysis.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ bool BasicAAResult::pointsToConstantMemory(const MemoryLocation &Loc,
661661
SmallVector<const Value *, 16> Worklist;
662662
Worklist.push_back(Loc.Ptr);
663663
do {
664-
const Value *V = getUnderlyingObject(Worklist.pop_back_val(), DL);
664+
const Value *V = getUnderlyingObject(Worklist.pop_back_val());
665665
if (!Visited.insert(V).second) {
666666
Visited.clear();
667667
return AAResultBase::pointsToConstantMemory(Loc, AAQI, OrLocal);
@@ -875,7 +875,7 @@ ModRefInfo BasicAAResult::getModRefInfo(const CallBase *Call,
875875
assert(notDifferentParent(Call, Loc.Ptr) &&
876876
"AliasAnalysis query involving multiple functions!");
877877

878-
const Value *Object = getUnderlyingObject(Loc.Ptr, DL);
878+
const Value *Object = getUnderlyingObject(Loc.Ptr);
879879

880880
// Calls marked 'tail' cannot read or write allocas from the current frame
881881
// because the current frame might be destroyed by the time they run. However,
@@ -1309,7 +1309,7 @@ bool BasicAAResult::isGEPBaseAtNegativeOffset(const GEPOperator *GEPOp,
13091309
/// another pointer.
13101310
///
13111311
/// We know that V1 is a GEP, but we don't know anything about V2.
1312-
/// UnderlyingV1 is getUnderlyingObject(GEP1, DL), UnderlyingV2 is the same for
1312+
/// UnderlyingV1 is getUnderlyingObject(GEP1), UnderlyingV2 is the same for
13131313
/// V2.
13141314
AliasResult BasicAAResult::aliasGEP(
13151315
const GEPOperator *GEP1, LocationSize V1Size, const AAMDNodes &V1AAInfo,
@@ -1782,10 +1782,10 @@ AliasResult BasicAAResult::aliasCheck(const Value *V1, LocationSize V1Size,
17821782

17831783
// Figure out what objects these things are pointing to if we can.
17841784
if (O1 == nullptr)
1785-
O1 = getUnderlyingObject(V1, DL, MaxLookupSearchDepth);
1785+
O1 = getUnderlyingObject(V1, MaxLookupSearchDepth);
17861786

17871787
if (O2 == nullptr)
1788-
O2 = getUnderlyingObject(V2, DL, MaxLookupSearchDepth);
1788+
O2 = getUnderlyingObject(V2, MaxLookupSearchDepth);
17891789

17901790
// Null values in the default address space don't point to any object, so they
17911791
// don't alias any other pointer.

llvm/lib/Analysis/ConstantFolding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ Constant *llvm::ConstantFoldLoadFromConstPtr(Constant *C, Type *Ty,
718718

719719
// If this load comes from anywhere in a constant global, and if the global
720720
// is all undef or zero, we know what it loads.
721-
if (auto *GV = dyn_cast<GlobalVariable>(getUnderlyingObject(CE, DL))) {
721+
if (auto *GV = dyn_cast<GlobalVariable>(getUnderlyingObject(CE))) {
722722
if (GV->isConstant() && GV->hasDefinitiveInitializer()) {
723723
if (GV->getInitializer()->isNullValue())
724724
return Constant::getNullValue(Ty);

llvm/lib/Analysis/DependenceAnalysis.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ static AliasResult underlyingObjectsAlias(AAResults *AA,
659659
return NoAlias;
660660

661661
// Check the underlying objects are the same
662-
const Value *AObj = getUnderlyingObject(LocA.Ptr, DL);
663-
const Value *BObj = getUnderlyingObject(LocB.Ptr, DL);
662+
const Value *AObj = getUnderlyingObject(LocA.Ptr);
663+
const Value *BObj = getUnderlyingObject(LocB.Ptr);
664664

665665
// If the underlying objects are the same, they must alias
666666
if (AObj == BObj)

llvm/lib/Analysis/GlobalsModRef.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,7 @@ bool GlobalsAAResult::AnalyzeIndirectGlobalMemory(GlobalVariable *GV) {
435435
continue;
436436

437437
// Check the value being stored.
438-
Value *Ptr = getUnderlyingObject(SI->getOperand(0),
439-
GV->getParent()->getDataLayout());
438+
Value *Ptr = getUnderlyingObject(SI->getOperand(0));
440439

441440
if (!isAllocLikeFn(Ptr, &GetTLI(*SI->getFunction())))
442441
return false; // Too hard to analyze.
@@ -661,12 +660,12 @@ static bool isNonEscapingGlobalNoAliasWithLoad(const GlobalValue *GV,
661660
return false;
662661

663662
if (auto *LI = dyn_cast<LoadInst>(Input)) {
664-
Inputs.push_back(getUnderlyingObject(LI->getPointerOperand(), DL));
663+
Inputs.push_back(getUnderlyingObject(LI->getPointerOperand()));
665664
continue;
666665
}
667666
if (auto *SI = dyn_cast<SelectInst>(Input)) {
668-
const Value *LHS = getUnderlyingObject(SI->getTrueValue(), DL);
669-
const Value *RHS = getUnderlyingObject(SI->getFalseValue(), DL);
667+
const Value *LHS = getUnderlyingObject(SI->getTrueValue());
668+
const Value *RHS = getUnderlyingObject(SI->getFalseValue());
670669
if (Visited.insert(LHS).second)
671670
Inputs.push_back(LHS);
672671
if (Visited.insert(RHS).second)
@@ -675,7 +674,7 @@ static bool isNonEscapingGlobalNoAliasWithLoad(const GlobalValue *GV,
675674
}
676675
if (auto *PN = dyn_cast<PHINode>(Input)) {
677676
for (const Value *Op : PN->incoming_values()) {
678-
Op = getUnderlyingObject(Op, DL);
677+
Op = getUnderlyingObject(Op);
679678
if (Visited.insert(Op).second)
680679
Inputs.push_back(Op);
681680
}
@@ -774,16 +773,16 @@ bool GlobalsAAResult::isNonEscapingGlobalNoAlias(const GlobalValue *GV,
774773
if (auto *LI = dyn_cast<LoadInst>(Input)) {
775774
// A pointer loaded from a global would have been captured, and we know
776775
// that the global is non-escaping, so no alias.
777-
const Value *Ptr = getUnderlyingObject(LI->getPointerOperand(), DL);
776+
const Value *Ptr = getUnderlyingObject(LI->getPointerOperand());
778777
if (isNonEscapingGlobalNoAliasWithLoad(GV, Ptr, Depth, DL))
779778
// The load does not alias with GV.
780779
continue;
781780
// Otherwise, a load could come from anywhere, so bail.
782781
return false;
783782
}
784783
if (auto *SI = dyn_cast<SelectInst>(Input)) {
785-
const Value *LHS = getUnderlyingObject(SI->getTrueValue(), DL);
786-
const Value *RHS = getUnderlyingObject(SI->getFalseValue(), DL);
784+
const Value *LHS = getUnderlyingObject(SI->getTrueValue());
785+
const Value *RHS = getUnderlyingObject(SI->getFalseValue());
787786
if (Visited.insert(LHS).second)
788787
Inputs.push_back(LHS);
789788
if (Visited.insert(RHS).second)
@@ -792,7 +791,7 @@ bool GlobalsAAResult::isNonEscapingGlobalNoAlias(const GlobalValue *GV,
792791
}
793792
if (auto *PN = dyn_cast<PHINode>(Input)) {
794793
for (const Value *Op : PN->incoming_values()) {
795-
Op = getUnderlyingObject(Op, DL);
794+
Op = getUnderlyingObject(Op);
796795
if (Visited.insert(Op).second)
797796
Inputs.push_back(Op);
798797
}
@@ -827,8 +826,8 @@ AliasResult GlobalsAAResult::alias(const MemoryLocation &LocA,
827826
const MemoryLocation &LocB,
828827
AAQueryInfo &AAQI) {
829828
// Get the base object these pointers point to.
830-
const Value *UV1 = getUnderlyingObject(LocA.Ptr, DL);
831-
const Value *UV2 = getUnderlyingObject(LocB.Ptr, DL);
829+
const Value *UV1 = getUnderlyingObject(LocA.Ptr);
830+
const Value *UV2 = getUnderlyingObject(LocB.Ptr);
832831

833832
// If either of the underlying values is a global, they may be non-addr-taken
834833
// globals, which we can answer queries about.
@@ -915,7 +914,7 @@ ModRefInfo GlobalsAAResult::getModRefInfoForArgument(const CallBase *Call,
915914
// is based on GV, return the conservative result.
916915
for (auto &A : Call->args()) {
917916
SmallVector<const Value*, 4> Objects;
918-
getUnderlyingObjects(A, Objects, DL);
917+
getUnderlyingObjects(A, Objects);
919918

920919
// All objects must be identified.
921920
if (!all_of(Objects, isIdentifiedObject) &&
@@ -942,7 +941,7 @@ ModRefInfo GlobalsAAResult::getModRefInfo(const CallBase *Call,
942941
// If we are asking for mod/ref info of a direct call with a pointer to a
943942
// global we are tracking, return information if we have it.
944943
if (const GlobalValue *GV =
945-
dyn_cast<GlobalValue>(getUnderlyingObject(Loc.Ptr, DL)))
944+
dyn_cast<GlobalValue>(getUnderlyingObject(Loc.Ptr)))
946945
// If GV is internal to this IR and there is no function with local linkage
947946
// that has had their address taken, keep looking for a tighter ModRefInfo.
948947
if (GV->hasLocalLinkage() && !UnknownFunctionsWithLocalLinkage)

llvm/lib/Analysis/InstructionSimplify.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,8 +2524,8 @@ computePointerICmp(const DataLayout &DL, const TargetLibraryInfo *TLI,
25242524
// memory within the lifetime of the current function (allocas, byval
25252525
// arguments, globals), then determine the comparison result here.
25262526
SmallVector<const Value *, 8> LHSUObjs, RHSUObjs;
2527-
getUnderlyingObjects(LHS, LHSUObjs, DL);
2528-
getUnderlyingObjects(RHS, RHSUObjs, DL);
2527+
getUnderlyingObjects(LHS, LHSUObjs);
2528+
getUnderlyingObjects(RHS, RHSUObjs);
25292529

25302530
// Is the set of underlying objects all noalias calls?
25312531
auto IsNAC = [](ArrayRef<const Value *> Objects) {

llvm/lib/Analysis/LazyValueInfo.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -606,13 +606,11 @@ Optional<ValueLatticeElement> LazyValueInfoImpl::solveBlockValueImpl(
606606
static bool InstructionDereferencesPointer(Instruction *I, Value *Ptr) {
607607
if (LoadInst *L = dyn_cast<LoadInst>(I)) {
608608
return L->getPointerAddressSpace() == 0 &&
609-
getUnderlyingObject(L->getPointerOperand(),
610-
L->getModule()->getDataLayout()) == Ptr;
609+
getUnderlyingObject(L->getPointerOperand()) == Ptr;
611610
}
612611
if (StoreInst *S = dyn_cast<StoreInst>(I)) {
613612
return S->getPointerAddressSpace() == 0 &&
614-
getUnderlyingObject(S->getPointerOperand(),
615-
S->getModule()->getDataLayout()) == Ptr;
613+
getUnderlyingObject(S->getPointerOperand()) == Ptr;
616614
}
617615
if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(I)) {
618616
if (MI->isVolatile()) return false;
@@ -622,13 +620,11 @@ static bool InstructionDereferencesPointer(Instruction *I, Value *Ptr) {
622620
if (!Len || Len->isZero()) return false;
623621

624622
if (MI->getDestAddressSpace() == 0)
625-
if (getUnderlyingObject(MI->getRawDest(),
626-
MI->getModule()->getDataLayout()) == Ptr)
623+
if (getUnderlyingObject(MI->getRawDest()) == Ptr)
627624
return true;
628625
if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(MI))
629626
if (MTI->getSourceAddressSpace() == 0)
630-
if (getUnderlyingObject(MTI->getRawSource(),
631-
MTI->getModule()->getDataLayout()) == Ptr)
627+
if (getUnderlyingObject(MTI->getRawSource()) == Ptr)
632628
return true;
633629
}
634630
return false;
@@ -641,11 +637,10 @@ static bool InstructionDereferencesPointer(Instruction *I, Value *Ptr) {
641637
static bool isObjectDereferencedInBlock(Value *Val, BasicBlock *BB) {
642638
assert(Val->getType()->isPointerTy());
643639

644-
const DataLayout &DL = BB->getModule()->getDataLayout();
645-
Value *UnderlyingVal = getUnderlyingObject(Val, DL);
640+
Value *UnderlyingVal = getUnderlyingObject(Val);
646641
// If 'getUnderlyingObject' didn't converge, skip it. It won't converge
647642
// inside InstructionDereferencesPointer either.
648-
if (UnderlyingVal == getUnderlyingObject(UnderlyingVal, DL, 1))
643+
if (UnderlyingVal == getUnderlyingObject(UnderlyingVal, 1))
649644
for (Instruction &I : *BB)
650645
if (InstructionDereferencesPointer(&I, UnderlyingVal))
651646
return true;

llvm/lib/Analysis/Lint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ Value *Lint::findValueImpl(Value *V, bool OffsetOk,
673673
// TODO: Look through eliminable cast pairs.
674674
// TODO: Look through calls with unique return values.
675675
// TODO: Look through vector insert/extract/shuffle.
676-
V = OffsetOk ? getUnderlyingObject(V, *DL) : V->stripPointerCasts();
676+
V = OffsetOk ? getUnderlyingObject(V) : V->stripPointerCasts();
677677
if (LoadInst *L = dyn_cast<LoadInst>(V)) {
678678
BasicBlock::iterator BBI = L->getIterator();
679679
BasicBlock *BB = L->getParent();

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -508,10 +508,10 @@ class AccessAnalysis {
508508
typedef PointerIntPair<Value *, 1, bool> MemAccessInfo;
509509
typedef SmallVector<MemAccessInfo, 8> MemAccessInfoList;
510510

511-
AccessAnalysis(const DataLayout &Dl, Loop *TheLoop, AAResults *AA,
512-
LoopInfo *LI, MemoryDepChecker::DepCandidates &DA,
511+
AccessAnalysis(Loop *TheLoop, AAResults *AA, LoopInfo *LI,
512+
MemoryDepChecker::DepCandidates &DA,
513513
PredicatedScalarEvolution &PSE)
514-
: DL(Dl), TheLoop(TheLoop), AST(*AA), LI(LI), DepCands(DA),
514+
: TheLoop(TheLoop), AST(*AA), LI(LI), DepCands(DA),
515515
IsRTCheckAnalysisNeeded(false), PSE(PSE) {}
516516

517517
/// Register a load and whether it is only read from.
@@ -585,8 +585,6 @@ class AccessAnalysis {
585585
/// Set of all accesses.
586586
PtrAccessSet Accesses;
587587

588-
const DataLayout &DL;
589-
590588
/// The loop being checked.
591589
const Loop *TheLoop;
592590

@@ -938,7 +936,7 @@ void AccessAnalysis::processMemAccesses() {
938936
typedef SmallVector<const Value *, 16> ValueVector;
939937
ValueVector TempObjects;
940938

941-
getUnderlyingObjects(Ptr, TempObjects, DL, LI);
939+
getUnderlyingObjects(Ptr, TempObjects, LI);
942940
LLVM_DEBUG(dbgs()
943941
<< "Underlying objects for pointer " << *Ptr << "\n");
944942
for (const Value *UnderlyingObj : TempObjects) {
@@ -1142,7 +1140,7 @@ bool llvm::sortPtrAccesses(ArrayRef<Value *> VL, const DataLayout &DL,
11421140
// first pointer in the array.
11431141
Value *Ptr0 = VL[0];
11441142
const SCEV *Scev0 = SE.getSCEV(Ptr0);
1145-
Value *Obj0 = getUnderlyingObject(Ptr0, DL);
1143+
Value *Obj0 = getUnderlyingObject(Ptr0);
11461144

11471145
llvm::SmallSet<int64_t, 4> Offsets;
11481146
for (auto *Ptr : VL) {
@@ -1153,7 +1151,7 @@ bool llvm::sortPtrAccesses(ArrayRef<Value *> VL, const DataLayout &DL,
11531151
return false;
11541152
// If a pointer refers to a different underlying object, bail - the
11551153
// pointers are by definition incomparable.
1156-
Value *CurrObj = getUnderlyingObject(Ptr, DL);
1154+
Value *CurrObj = getUnderlyingObject(Ptr);
11571155
if (CurrObj != Obj0)
11581156
return false;
11591157

@@ -1947,8 +1945,7 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI,
19471945
}
19481946

19491947
MemoryDepChecker::DepCandidates DependentAccesses;
1950-
AccessAnalysis Accesses(TheLoop->getHeader()->getModule()->getDataLayout(),
1951-
TheLoop, AA, LI, DependentAccesses, *PSE);
1948+
AccessAnalysis Accesses(TheLoop, AA, LI, DependentAccesses, *PSE);
19521949

19531950
// Holds the analyzed pointers. We don't want to call getUnderlyingObjects
19541951
// multiple times on the same object. If the ptr is accessed twice, once

llvm/lib/Analysis/MemoryDependenceAnalysis.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,6 @@ MemDepResult MemoryDependenceResults::getSimplePointerDependencyFrom(
406406
isInvariantLoad = true;
407407
}
408408

409-
const DataLayout &DL = BB->getModule()->getDataLayout();
410-
411409
// Return "true" if and only if the instruction I is either a non-simple
412410
// load or a non-simple store.
413411
auto isNonSimpleLoadOrStore = [](Instruction *I) -> bool {
@@ -576,7 +574,7 @@ MemDepResult MemoryDependenceResults::getSimplePointerDependencyFrom(
576574
// looking for a clobber in many cases; that's an alias property and is
577575
// handled by BasicAA.
578576
if (isa<AllocaInst>(Inst) || isNoAliasFn(Inst, &TLI)) {
579-
const Value *AccessPtr = getUnderlyingObject(MemLoc.Ptr, DL);
577+
const Value *AccessPtr = getUnderlyingObject(MemLoc.Ptr);
580578
if (AccessPtr == Inst || AA.isMustAlias(Inst, AccessPtr))
581579
return MemDepResult::getDef(Inst);
582580
}

llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ AliasResult ObjCARCAAResult::alias(const MemoryLocation &LocA,
5454

5555
// If that failed, climb to the underlying object, including climbing through
5656
// ObjC-specific no-ops, and try making an imprecise alias query.
57-
const Value *UA = GetUnderlyingObjCPtr(SA, DL);
58-
const Value *UB = GetUnderlyingObjCPtr(SB, DL);
57+
const Value *UA = GetUnderlyingObjCPtr(SA);
58+
const Value *UB = GetUnderlyingObjCPtr(SB);
5959
if (UA != SA || UB != SB) {
6060
Result = AAResultBase::alias(MemoryLocation(UA), MemoryLocation(UB), AAQI);
6161
// We can't use MustAlias or PartialAlias results here because
@@ -83,7 +83,7 @@ bool ObjCARCAAResult::pointsToConstantMemory(const MemoryLocation &Loc,
8383

8484
// If that failed, climb to the underlying object, including climbing through
8585
// ObjC-specific no-ops, and try making an imprecise alias query.
86-
const Value *U = GetUnderlyingObjCPtr(S, DL);
86+
const Value *U = GetUnderlyingObjCPtr(S);
8787
if (U != S)
8888
return AAResultBase::pointsToConstantMemory(MemoryLocation(U), AAQI,
8989
OrLocal);

0 commit comments

Comments
 (0)