[llvm] 32851f8 - [Alignment][NFC] Deprecate VectorUtils::getAlignment
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 23 06:06:18 PDT 2020
Author: Guillaume Chatelet
Date: 2020-03-23T13:54:15+01:00
New Revision: 32851f8d635acc06c4eb431cd0bd27eb99402dbf
URL: https://github.com/llvm/llvm-project/commit/32851f8d635acc06c4eb431cd0bd27eb99402dbf
DIFF: https://github.com/llvm/llvm-project/commit/32851f8d635acc06c4eb431cd0bd27eb99402dbf.diff
LOG: [Alignment][NFC] Deprecate VectorUtils::getAlignment
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/D76542
Added:
Modified:
llvm/include/llvm/Analysis/VectorUtils.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPlan.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/VectorUtils.h b/llvm/include/llvm/Analysis/VectorUtils.h
index 383f33c63ede..2a122db95fd8 100644
--- a/llvm/include/llvm/Analysis/VectorUtils.h
+++ b/llvm/include/llvm/Analysis/VectorUtils.h
@@ -530,7 +530,10 @@ template <typename InstTy> class InterleaveGroup {
bool isReverse() const { return Reverse; }
uint32_t getFactor() const { return Factor; }
- uint32_t getAlignment() const { return Alignment.value(); }
+ LLVM_ATTRIBUTE_DEPRECATED(uint32_t getAlignment() const,
+ "Use getAlign instead.") {
+ return Alignment.value();
+ }
Align getAlign() const { return Alignment; }
uint32_t getNumMembers() const { return Members.size(); }
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index a1957ccda3a1..60cf5be692fb 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5919,7 +5919,7 @@ unsigned LoopVectorizationCostModel::getInterleaveGroupCost(Instruction *I,
Group->requiresScalarEpilogue() && !isScalarEpilogueAllowed();
unsigned Cost = TTI.getInterleavedMemoryOpCost(
I->getOpcode(), WideVecTy, Group->getFactor(), Indices,
- Group->getAlignment(), AS, Legal->isMaskRequired(I), UseMaskForGaps);
+ Group->getAlign().value(), AS, Legal->isMaskRequired(I), UseMaskForGaps);
if (Group->isReverse()) {
// TODO: Add support for reversed masked interleaved access.
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index 28463943bfa3..f584b9286694 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -844,7 +844,7 @@ void VPInterleavedAccessInfo::visitBlock(VPBlockBase *Block, Old2NewTy &Old2New,
auto NewIGIter = Old2New.find(IG);
if (NewIGIter == Old2New.end())
Old2New[IG] = new InterleaveGroup<VPInstruction>(
- IG->getFactor(), IG->isReverse(), Align(IG->getAlignment()));
+ IG->getFactor(), IG->isReverse(), IG->getAlign());
if (Inst == IG->getInsertPos())
Old2New[IG]->setInsertPos(VPInst);
More information about the llvm-commits
mailing list