From ecf1b4c24da72dcb363319d9907f020c7ad27960 Mon Sep 17 00:00:00 2001 From: Silviu Baranga Date: Wed, 9 Mar 2016 12:39:06 +0000 Subject: [PATCH] Update comments following the addition of PredicatedScalarEvolution. NFC. We changed several functions in LoopAccessAnalysis to use PSE instead of taking SE and a SCEV predicate as arguments, but didn't update the comments. This also fixes a comment in ScalarEvolution, where we refered to Preds when the argument name was A. llvm-svn: 263009 --- llvm/include/llvm/Analysis/LoopAccessAnalysis.h | 17 +++++++++-------- llvm/include/llvm/Analysis/ScalarEvolution.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h index 1c4cfc9..13aa0f5 100644 --- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h +++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h @@ -363,10 +363,10 @@ public: } /// Insert a pointer and calculate the start and end SCEVs. - /// \p We need Preds in order to compute the SCEV expression of the pointer + /// We need \p PSE in order to compute the SCEV expression of the pointer /// according to the assumptions that we've made during the analysis. /// The method might also version the pointer stride according to \p Strides, - /// and change \p Preds. + /// and add new predicates to \p PSE. void insert(Loop *Lp, Value *Ptr, bool WritePtr, unsigned DepSetId, unsigned ASId, const ValueToValueMap &Strides, PredicatedScalarEvolution &PSE); @@ -638,11 +638,12 @@ private: Value *stripIntegerCast(Value *V); -///\brief Return the SCEV corresponding to a pointer with the symbolic stride -/// replaced with constant one, assuming \p Preds is true. +/// \brief Return the SCEV corresponding to a pointer with the symbolic stride +/// replaced with constant one, assuming the SCEV predicate associated with +/// \p PSE is true. /// /// If necessary this method will version the stride of the pointer according -/// to \p PtrToStride and therefore add a new predicate to \p Preds. +/// 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 @@ -654,11 +655,11 @@ const SCEV *replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE, /// \brief If the pointer has a constant stride return it in units of its /// element size. Otherwise return zero. /// -/// Ensure that it does not wrap in the address space, assuming \p Preds is -/// true. +/// Ensure that it does not wrap in the address space, assuming the predicate +/// associated with \p PSE is true. /// /// If necessary this method will version the stride of the pointer according -/// to \p PtrToStride and therefore add a new predicate to \p Preds. +/// to \p PtrToStride and therefore add further predicates to \p PSE. /// The \p Assume parameter indicates if we are allowed to make additional /// run-time assumptions. int isStridedPtr(PredicatedScalarEvolution &PSE, Value *Ptr, const Loop *Lp, diff --git a/llvm/include/llvm/Analysis/ScalarEvolution.h b/llvm/include/llvm/Analysis/ScalarEvolution.h index 1aa3092..acc5165 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolution.h +++ b/llvm/include/llvm/Analysis/ScalarEvolution.h @@ -1392,7 +1392,7 @@ namespace llvm { getWrapPredicate(const SCEVAddRecExpr *AR, SCEVWrapPredicate::IncrementWrapFlags AddedFlags); - /// Re-writes the SCEV according to the Predicates in \p Preds. + /// Re-writes the SCEV according to the Predicates in \p A. const SCEV *rewriteUsingPredicate(const SCEV *S, const Loop *L, SCEVUnionPredicate &A); /// Tries to convert the \p S expression to an AddRec expression, -- 2.7.4