Skip to content

Commit f4726e7

Browse files
committed
[LAA] Remove unused OrigPtr from replaceSymbolicStrideSCEV (NFC).
The OrigPtr argument is not used in tree.
1 parent 40a89da commit f4726e7

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

llvm/include/llvm/Analysis/LoopAccessAnalysis.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -664,12 +664,11 @@ Value *stripIntegerCast(Value *V);
664664
/// If necessary this method will version the stride of the pointer according
665665
/// to \p PtrToStride and therefore add further predicates to \p PSE.
666666
///
667-
/// If \p OrigPtr is not null, use it to look up the stride value instead of \p
668-
/// Ptr. \p PtrToStride provides the mapping between the pointer value and its
667+
/// \p PtrToStride provides the mapping between the pointer value and its
669668
/// stride as collected by LoopVectorizationLegality::collectStridedAccess.
670669
const SCEV *replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE,
671670
const ValueToValueMap &PtrToStride,
672-
Value *Ptr, Value *OrigPtr = nullptr);
671+
Value *Ptr);
673672

674673
/// If the pointer has a constant stride return it in units of its
675674
/// element size. Otherwise return zero.

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,12 @@ Value *llvm::stripIntegerCast(Value *V) {
142142

143143
const SCEV *llvm::replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE,
144144
const ValueToValueMap &PtrToStride,
145-
Value *Ptr, Value *OrigPtr) {
145+
Value *Ptr) {
146146
const SCEV *OrigSCEV = PSE.getSCEV(Ptr);
147147

148148
// If there is an entry in the map return the SCEV of the pointer with the
149149
// symbolic stride replaced by one.
150-
ValueToValueMap::const_iterator SI =
151-
PtrToStride.find(OrigPtr ? OrigPtr : Ptr);
150+
ValueToValueMap::const_iterator SI = PtrToStride.find(Ptr);
152151
if (SI == PtrToStride.end())
153152
// For a non-symbolic stride, just return the original expression.
154153
return OrigSCEV;

0 commit comments

Comments
 (0)