Skip to content

Commit 0503de2

Browse files
committed
Address review comment
1 parent 9aae1c7 commit 0503de2

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

llvm/include/llvm/Analysis/LoopAccessAnalysis.h

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,9 +853,19 @@ bool sortPtrAccesses(ArrayRef<Value *> VL, Type *ElemTy, const DataLayout &DL,
853853
bool isConsecutiveAccess(Value *A, Value *B, const DataLayout &DL,
854854
ScalarEvolution &SE, bool CheckType = true);
855855

856-
/// For a given Loop \p Lp and pointer \p PtrExpr return a pair of SCEV values
857-
/// representing the maximum range of addresses accessed in the loop, i.e.
858-
/// [min,max).
856+
/// Calculate Start and End points of memory access.
857+
/// Let's assume A is the first access and B is a memory access on N-th loop
858+
/// iteration. Then B is calculated as:
859+
/// B = A + Step*N .
860+
/// Step value may be positive or negative.
861+
/// N is a calculated back-edge taken count:
862+
/// N = (TripCount > 0) ? RoundDown(TripCount -1 , VF) : 0
863+
/// Start and End points are calculated in the following way:
864+
/// Start = UMIN(A, B) ; End = UMAX(A, B) + SizeOfElt,
865+
/// where SizeOfElt is the size of single memory access in bytes.
866+
///
867+
/// There is no conflict when the intervals are disjoint:
868+
/// NoConflict = (P2.Start >= P1.End) || (P1.Start >= P2.End)
859869
std::pair<const SCEV *, const SCEV *> getStartAndEndForAccess(
860870
const Loop *Lp, const SCEV *PtrExpr, Type *AccessTy, const SCEV *MaxBECount,
861871
ScalarEvolution *SE,

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -190,19 +190,6 @@ RuntimeCheckingPtrGroup::RuntimeCheckingPtrGroup(
190190
Members.push_back(Index);
191191
}
192192

193-
/// Calculate Start and End points of memory access.
194-
/// Let's assume A is the first access and B is a memory access on N-th loop
195-
/// iteration. Then B is calculated as:
196-
/// B = A + Step*N .
197-
/// Step value may be positive or negative.
198-
/// N is a calculated back-edge taken count:
199-
/// N = (TripCount > 0) ? RoundDown(TripCount -1 , VF) : 0
200-
/// Start and End points are calculated in the following way:
201-
/// Start = UMIN(A, B) ; End = UMAX(A, B) + SizeOfElt,
202-
/// where SizeOfElt is the size of single memory access in bytes.
203-
///
204-
/// There is no conflict when the intervals are disjoint:
205-
/// NoConflict = (P2.Start >= P1.End) || (P1.Start >= P2.End)
206193
std::pair<const SCEV *, const SCEV *> llvm::getStartAndEndForAccess(
207194
const Loop *Lp, const SCEV *PtrExpr, Type *AccessTy, const SCEV *MaxBECount,
208195
ScalarEvolution *SE,

0 commit comments

Comments
 (0)