summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Simpson <mssimpso@codeaurora.org>2016-07-14 21:05:08 +0000
committerMatthew Simpson <mssimpso@codeaurora.org>2016-07-14 21:05:08 +0000
commit96e881deb5243dc915d049874389b4d01ae2db2a (patch)
treeb1654887175259cb5989678609ee01b0a13eb6f1
parent4acb65ecee87395154c8bf7ae1ad619320c37225 (diff)
downloadbcm5719-llvm-96e881deb5243dc915d049874389b4d01ae2db2a.tar.gz
bcm5719-llvm-96e881deb5243dc915d049874389b4d01ae2db2a.zip
[LV] Rename StrideAccesses to AccessStrideInfo (NFC)
We now collect all accesses with a constant stride, not just the ones with a stride greater than one. This change was requested in the review of D19984. llvm-svn: 275473
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 2a2c6409d67..3a26bb66c8d 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -937,8 +937,8 @@ private:
}
/// \brief Collect all the accesses with a constant stride in program order.
- void collectConstStridedAccesses(
- MapVector<Instruction *, StrideDescriptor> &StrideAccesses,
+ void collectConstStrideAccesses(
+ MapVector<Instruction *, StrideDescriptor> &AccessStrideInfo,
const ValueToValueMap &Strides);
/// \brief Returns true if \p Stride is allowed in an interleaved group.
@@ -4927,8 +4927,8 @@ bool LoopVectorizationLegality::blockCanBePredicated(
return true;
}
-void InterleavedAccessInfo::collectConstStridedAccesses(
- MapVector<Instruction *, StrideDescriptor> &StrideAccesses,
+void InterleavedAccessInfo::collectConstStrideAccesses(
+ MapVector<Instruction *, StrideDescriptor> &AccessStrideInfo,
const ValueToValueMap &Strides) {
auto &DL = TheLoop->getHeader()->getModule()->getDataLayout();
@@ -4938,7 +4938,7 @@ void InterleavedAccessInfo::collectConstStridedAccesses(
// blocks in the loop in reverse postorder (i.e., in a topological order).
// Such an ordering will ensure that any load/store that may be executed
// before a second load/store will precede the second load/store in
- // StrideAccesses.
+ // AccessStrideInfo.
LoopBlocksDFS DFS(TheLoop);
DFS.perform(LI);
for (BasicBlock *BB : make_range(DFS.beginRPO(), DFS.endRPO()))
@@ -4960,7 +4960,7 @@ void InterleavedAccessInfo::collectConstStridedAccesses(
if (!Align)
Align = DL.getABITypeAlignment(PtrTy->getElementType());
- StrideAccesses[&I] = StrideDescriptor(Stride, Scev, Size, Align);
+ AccessStrideInfo[&I] = StrideDescriptor(Stride, Scev, Size, Align);
}
}
@@ -5004,11 +5004,11 @@ void InterleavedAccessInfo::analyzeInterleaving(
const ValueToValueMap &Strides) {
DEBUG(dbgs() << "LV: Analyzing interleaved accesses...\n");
- // Holds all the stride accesses.
- MapVector<Instruction *, StrideDescriptor> StrideAccesses;
- collectConstStridedAccesses(StrideAccesses, Strides);
+ // Holds all accesses with a constant stride.
+ MapVector<Instruction *, StrideDescriptor> AccessStrideInfo;
+ collectConstStrideAccesses(AccessStrideInfo, Strides);
- if (StrideAccesses.empty())
+ if (AccessStrideInfo.empty())
return;
// Collect the dependences in the loop.
@@ -5024,8 +5024,8 @@ void InterleavedAccessInfo::analyzeInterleaving(
// 1. A and B have the same stride.
// 2. A and B have the same memory object size.
// 3. B belongs to the group according to the distance.
- for (auto AI = StrideAccesses.rbegin(), E = StrideAccesses.rend(); AI != E;
- ++AI) {
+ for (auto AI = AccessStrideInfo.rbegin(), E = AccessStrideInfo.rend();
+ AI != E; ++AI) {
Instruction *A = AI->first;
StrideDescriptor DesA = AI->second;
OpenPOWER on IntegriCloud