summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/LoopAccessAnalysis.cpp
diff options
context:
space:
mode:
authorDenis Zobnin <d.zobnin.bugzilla@gmail.com>2016-05-10 05:55:16 +0000
committerDenis Zobnin <d.zobnin.bugzilla@gmail.com>2016-05-10 05:55:16 +0000
commit15d1e64b2b1cdece177102074f03ee161fed91fb (patch)
treeea6aa3d57f319c66aed2527b8a094c4bafcbf63e /llvm/lib/Analysis/LoopAccessAnalysis.cpp
parent11e87cc94577682b9275e5e48edfccc4a478bc08 (diff)
downloadbcm5719-llvm-15d1e64b2b1cdece177102074f03ee161fed91fb.tar.gz
bcm5719-llvm-15d1e64b2b1cdece177102074f03ee161fed91fb.zip
[LAA] Rename "isStridedPtr" with "getPtrStride". NFC.
Changing misleading function name was approved in http://reviews.llvm.org/D17268. Patch by Roman Shirokiy. llvm-svn: 269021
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/LoopAccessAnalysis.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index cb7ee1cb246..630ff7639b5 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -583,7 +583,7 @@ bool AccessAnalysis::canCheckPtrAtRT(RuntimePointerChecking &RtCheck,
// When we run after a failing dependency check we have to make sure
// we don't have wrapping pointers.
(!ShouldCheckStride ||
- isStridedPtr(PSE, Ptr, TheLoop, StridesMap) == 1)) {
+ getPtrStride(PSE, Ptr, TheLoop, StridesMap) == 1)) {
// The id of the dependence set.
unsigned DepId;
@@ -832,7 +832,7 @@ static bool isNoWrapAddRec(Value *Ptr, const SCEVAddRecExpr *AR,
}
/// \brief Check whether the access through \p Ptr has a constant stride.
-int llvm::isStridedPtr(PredicatedScalarEvolution &PSE, Value *Ptr,
+int llvm::getPtrStride(PredicatedScalarEvolution &PSE, Value *Ptr,
const Loop *Lp, const ValueToValueMap &StridesMap,
bool Assume) {
Type *Ty = Ptr->getType();
@@ -1161,8 +1161,8 @@ MemoryDepChecker::isDependent(const MemAccessInfo &A, unsigned AIdx,
const SCEV *AScev = replaceSymbolicStrideSCEV(PSE, Strides, APtr);
const SCEV *BScev = replaceSymbolicStrideSCEV(PSE, Strides, BPtr);
- int StrideAPtr = isStridedPtr(PSE, APtr, InnermostLoop, Strides, true);
- int StrideBPtr = isStridedPtr(PSE, BPtr, InnermostLoop, Strides, true);
+ int StrideAPtr = getPtrStride(PSE, APtr, InnermostLoop, Strides, true);
+ int StrideBPtr = getPtrStride(PSE, BPtr, InnermostLoop, Strides, true);
const SCEV *Src = AScev;
const SCEV *Sink = BScev;
@@ -1615,7 +1615,7 @@ void LoopAccessInfo::analyzeLoop(const ValueToValueMap &Strides) {
// read a few words, modify, and write a few words, and some of the
// words may be written to the same address.
bool IsReadOnlyPtr = false;
- if (Seen.insert(Ptr).second || !isStridedPtr(PSE, Ptr, TheLoop, Strides)) {
+ if (Seen.insert(Ptr).second || !getPtrStride(PSE, Ptr, TheLoop, Strides)) {
++NumReads;
IsReadOnlyPtr = true;
}
OpenPOWER on IntegriCloud