diff options
author | Vitaly Buka <vitalybuka@google.com> | 2020-07-31 02:09:54 -0700 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2020-07-31 02:10:03 -0700 |
commit | b0eb40ca3998c73b7e24b02e89ab3581f2daf647 (patch) | |
tree | bfef3249a1f551dfb755af1fad36fb0b4157fd4c /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 4d6eec8e70fbf4f68fbaab5a5f80f28ddaaf586f (diff) | |
download | llvm-b0eb40ca3998c73b7e24b02e89ab3581f2daf647.zip llvm-b0eb40ca3998c73b7e24b02e89ab3581f2daf647.tar.gz llvm-b0eb40ca3998c73b7e24b02e89ab3581f2daf647.tar.bz2 |
[NFC] Remove unused GetUnderlyingObject paramenter
Depends on D84617.
Differential Revision: https://reviews.llvm.org/D84621
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 54a2796..5213207 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -4160,8 +4160,7 @@ static bool isSameUnderlyingObjectInLoop(const PHINode *PN, return true; } -Value *llvm::getUnderlyingObject(Value *V, const DataLayout &DL, - unsigned MaxLookup) { +Value *llvm::getUnderlyingObject(Value *V, unsigned MaxLookup) { if (!V->getType()->isPointerTy()) return V; for (unsigned Count = 0; MaxLookup == 0 || Count < MaxLookup; ++Count) { @@ -4208,14 +4207,13 @@ Value *llvm::getUnderlyingObject(Value *V, const DataLayout &DL, void llvm::getUnderlyingObjects(const Value *V, SmallVectorImpl<const Value *> &Objects, - const DataLayout &DL, LoopInfo *LI, - unsigned MaxLookup) { + LoopInfo *LI, unsigned MaxLookup) { SmallPtrSet<const Value *, 4> Visited; SmallVector<const Value *, 4> Worklist; Worklist.push_back(V); do { const Value *P = Worklist.pop_back_val(); - P = getUnderlyingObject(P, DL, MaxLookup); + P = getUnderlyingObject(P, MaxLookup); if (!Visited.insert(P).second) continue; @@ -4280,15 +4278,14 @@ static const Value *getUnderlyingObjectFromInt(const Value *V) { /// ptrtoint+arithmetic+inttoptr sequences. /// It returns false if unidentified object is found in getUnderlyingObjects. bool llvm::getUnderlyingObjectsForCodeGen(const Value *V, - SmallVectorImpl<Value *> &Objects, - const DataLayout &DL) { + SmallVectorImpl<Value *> &Objects) { SmallPtrSet<const Value *, 16> Visited; SmallVector<const Value *, 4> Working(1, V); do { V = Working.pop_back_val(); SmallVector<const Value *, 4> Objs; - getUnderlyingObjects(V, Objs, DL); + getUnderlyingObjects(V, Objs); for (const Value *V : Objs) { if (!Visited.insert(V).second) |