From f4726e72386d4107f427f3b4825bdfb92d0d1a1e Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 8 Sep 2021 20:49:32 +0200 Subject: [PATCH] [LAA] Remove unused OrigPtr from replaceSymbolicStrideSCEV (NFC). The OrigPtr argument is not used in tree. --- llvm/include/llvm/Analysis/LoopAccessAnalysis.h | 5 ++--- llvm/lib/Analysis/LoopAccessAnalysis.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h index 0a0ef1536caf..81132edb9e2b 100644 --- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h +++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h @@ -664,12 +664,11 @@ Value *stripIntegerCast(Value *V); /// If necessary this method will version the stride of the pointer according /// to \p PtrToStride and therefore add further predicates to \p PSE. /// -/// If \p OrigPtr is not null, use it to look up the stride value instead of \p -/// Ptr. \p PtrToStride provides the mapping between the pointer value and its +/// \p PtrToStride provides the mapping between the pointer value and its /// stride as collected by LoopVectorizationLegality::collectStridedAccess. const SCEV *replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE, const ValueToValueMap &PtrToStride, - Value *Ptr, Value *OrigPtr = nullptr); + Value *Ptr); /// If the pointer has a constant stride return it in units of its /// element size. Otherwise return zero. diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index a239928ecf38..6b1c493495bb 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -142,13 +142,12 @@ Value *llvm::stripIntegerCast(Value *V) { const SCEV *llvm::replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE, const ValueToValueMap &PtrToStride, - Value *Ptr, Value *OrigPtr) { + Value *Ptr) { const SCEV *OrigSCEV = PSE.getSCEV(Ptr); // If there is an entry in the map return the SCEV of the pointer with the // symbolic stride replaced by one. - ValueToValueMap::const_iterator SI = - PtrToStride.find(OrigPtr ? OrigPtr : Ptr); + ValueToValueMap::const_iterator SI = PtrToStride.find(Ptr); if (SI == PtrToStride.end()) // For a non-symbolic stride, just return the original expression. return OrigSCEV;