diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp --- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp @@ -1786,7 +1786,6 @@ continue; Instruction *DefI = Def->getMemoryInst(); - SmallVector Pointers; auto DefLoc = getLocForWriteEx(DefI); if (!DefLoc) continue; @@ -1814,8 +1813,7 @@ /// \returns true if \p Def is a no-op store, either because it /// directly stores back a loaded value or stores zero to a calloced object. - bool storeIsNoop(MemoryDef *Def, const MemoryLocation &DefLoc, - const Value *DefUO) { + bool storeIsNoop(MemoryDef *Def, const Value *DefUO) { StoreInst *Store = dyn_cast(Def->getMemoryInst()); MemSetInst *MemSet = dyn_cast(Def->getMemoryInst()); Constant *StoredConstant = nullptr; @@ -2084,7 +2082,7 @@ // Check if the store is a no-op. if (!Shortend && isRemovable(SI) && - State.storeIsNoop(KillingDef, SILoc, SILocUnd)) { + State.storeIsNoop(KillingDef, SILocUnd)) { LLVM_DEBUG(dbgs() << "DSE: Remove No-Op Store:\n DEAD: " << *SI << '\n'); State.deleteDeadInstruction(SI); NumRedundantStores++;