[PATCH] D150662: [SLP] Rename IsUniformStride to IsUnitStride. NFCI
Luke Lau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 05:21:40 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd088b8af937a: [SLP] Rename IsUniformStride to IsUnitStride. NFCI (authored by luke).
Changed prior to commit:
https://reviews.llvm.org/D150662?vs=522555&id=523009#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150662/new/
https://reviews.llvm.org/D150662
Files:
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Index: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
===================================================================
--- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -7396,8 +7396,7 @@
// stay in vectorized code due to uses outside of these scalar
// loads/stores.
ScalarCost = TTI->getPointersChainCost(
- Ptrs, BasePtr, TTI::PointersChainInfo::getKnownUniformStrided(),
- CostKind);
+ Ptrs, BasePtr, TTI::PointersChainInfo::getUnitStride(), CostKind);
SmallVector<const Value *> PtrsRetainedInVecCode;
for (Value *V : Ptrs) {
@@ -7423,7 +7422,7 @@
}
VecCost = TTI->getPointersChainCost(
PtrsRetainedInVecCode, BasePtr,
- TTI::PointersChainInfo::getKnownNonUniformStrided(), CostKind);
+ TTI::PointersChainInfo::getKnownStride(), CostKind);
} else {
// Case 1: Ptrs are the arguments of loads that we are going to transform
// into masked gather load intrinsic.
@@ -7436,8 +7435,8 @@
auto *Ptr = dyn_cast<GetElementPtrInst>(V);
return Ptr && !Ptr->hasAllConstantIndices();
})
- ? TTI::PointersChainInfo::getNonUniformStrided()
- : TTI::PointersChainInfo::getKnownNonUniformStrided();
+ ? TTI::PointersChainInfo::getUnknownStride()
+ : TTI::PointersChainInfo::getKnownStride();
ScalarCost = TTI->getPointersChainCost(Ptrs, BasePtr, PtrsInfo, CostKind);
Index: llvm/include/llvm/Analysis/TargetTransformInfo.h
===================================================================
--- llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ llvm/include/llvm/Analysis/TargetTransformInfo.h
@@ -293,32 +293,26 @@
/// All the GEPs in a set have same base address.
unsigned IsSameBaseAddress : 1;
/// These properties only valid if SameBaseAddress is set.
- /// True if distance between any two neigbouring pointers is same value.
- unsigned IsUniformStride : 1;
+ /// True if all pointers are separated by a unit stride.
+ unsigned IsUnitStride : 1;
/// True if distance between any two neigbouring pointers is a known value.
unsigned IsKnownStride : 1;
unsigned Reserved : 29;
bool isSameBase() const { return IsSameBaseAddress; }
- bool isUniformStride() const {
- return IsSameBaseAddress && IsUniformStride;
- }
+ bool isUnitStride() const { return IsSameBaseAddress && IsUnitStride; }
bool isKnownStride() const { return IsSameBaseAddress && IsKnownStride; }
- static PointersChainInfo getKnownUniformStrided() {
- return {/*IsSameBaseAddress=*/1, /*IsUniformStride=*/1,
+ static PointersChainInfo getUnitStride() {
+ return {/*IsSameBaseAddress=*/1, /*IsUnitStride=*/1,
/*IsKnownStride=*/1, 0};
}
- static PointersChainInfo getUniformStrided() {
- return {/*IsSameBaseAddress=*/1, /*IsUniformStride=*/1,
- /*IsKnownStride=*/0, 0};
- }
- static PointersChainInfo getKnownNonUniformStrided() {
- return {/*IsSameBaseAddress=*/1, /*IsUniformStride=*/0,
+ static PointersChainInfo getKnownStride() {
+ return {/*IsSameBaseAddress=*/1, /*IsUnitStride=*/0,
/*IsKnownStride=*/1, 0};
}
- static PointersChainInfo getNonUniformStrided() {
- return {/*IsSameBaseAddress=*/1, /*IsUniformStride=*/0,
+ static PointersChainInfo getUnknownStride() {
+ return {/*IsSameBaseAddress=*/1, /*IsUnitStride=*/0,
/*IsKnownStride=*/0, 0};
}
};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150662.523009.patch
Type: text/x-patch
Size: 3634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230517/086ca534/attachment.bin>
More information about the llvm-commits
mailing list