summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/VectorUtils.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2019-10-10 12:35:04 +0000
committerGuillaume Chatelet <gchatelet@google.com>2019-10-10 12:35:04 +0000
commit837a1b84ced64b3cf3dfdedb98fdcc187582892d (patch)
treeb53b11c9d09af508fae55ec0262c972203ffd3c5 /llvm/lib/Analysis/VectorUtils.cpp
parent1508fbad79d9d3004b28c2962361681141e609c7 (diff)
downloadbcm5719-llvm-837a1b84ced64b3cf3dfdedb98fdcc187582892d.tar.gz
bcm5719-llvm-837a1b84ced64b3cf3dfdedb98fdcc187582892d.zip
[Alignment][NFC] Make VectorUtils uas llvm::Align
Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: hiraditya, rogfer01, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D68784 llvm-svn: 374330
Diffstat (limited to 'llvm/lib/Analysis/VectorUtils.cpp')
-rw-r--r--llvm/lib/Analysis/VectorUtils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp
index f54794c59e3..600f57ab9d7 100644
--- a/llvm/lib/Analysis/VectorUtils.cpp
+++ b/llvm/lib/Analysis/VectorUtils.cpp
@@ -836,11 +836,11 @@ void InterleavedAccessInfo::collectConstStrideAccesses(
uint64_t Size = DL.getTypeAllocSize(PtrTy->getElementType());
// An alignment of 0 means target ABI alignment.
- unsigned Align = getLoadStoreAlignment(&I);
- if (!Align)
- Align = DL.getABITypeAlignment(PtrTy->getElementType());
+ MaybeAlign Alignment = MaybeAlign(getLoadStoreAlignment(&I));
+ if (!Alignment)
+ Alignment = Align(DL.getABITypeAlignment(PtrTy->getElementType()));
- AccessStrideInfo[&I] = StrideDescriptor(Stride, Scev, Size, Align);
+ AccessStrideInfo[&I] = StrideDescriptor(Stride, Scev, Size, *Alignment);
}
}
@@ -927,7 +927,7 @@ void InterleavedAccessInfo::analyzeInterleaving(
if (!Group) {
LLVM_DEBUG(dbgs() << "LV: Creating an interleave group with:" << *B
<< '\n');
- Group = createInterleaveGroup(B, DesB.Stride, DesB.Align);
+ Group = createInterleaveGroup(B, DesB.Stride, DesB.Alignment);
}
if (B->mayWriteToMemory())
StoreGroups.insert(Group);
@@ -1034,7 +1034,7 @@ void InterleavedAccessInfo::analyzeInterleaving(
Group->getIndex(B) + DistanceToB / static_cast<int64_t>(DesB.Size);
// Try to insert A into B's group.
- if (Group->insertMember(A, IndexA, DesA.Align)) {
+ if (Group->insertMember(A, IndexA, DesA.Alignment)) {
LLVM_DEBUG(dbgs() << "LV: Inserted:" << *A << '\n'
<< " into the interleave group with" << *B
<< '\n');
OpenPOWER on IntegriCloud