Skip to content

Commit ca2eabd

Browse files
committed
[SLP][NFC]Improve code to meet coding standards, NFC.
1 parent c09d3c1 commit ca2eabd

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,14 +2513,14 @@ class BoUpSLP {
25132513
/// Helper for `findExternalStoreUsersReorderIndices()`. It iterates over the
25142514
/// users of \p TE and collects the stores. It returns the map from the store
25152515
/// pointers to the collected stores.
2516-
DenseMap<Value *, SmallVector<StoreInst *, 4>>
2516+
DenseMap<Value *, SmallVector<StoreInst *>>
25172517
collectUserStores(const BoUpSLP::TreeEntry *TE) const;
25182518

25192519
/// Helper for `findExternalStoreUsersReorderIndices()`. It checks if the
25202520
/// stores in \p StoresVec can form a vector instruction. If so it returns true
25212521
/// and populates \p ReorderIndices with the shuffle indices of the the stores
25222522
/// when compared to the sorted vector.
2523-
bool canFormVector(const SmallVector<StoreInst *, 4> &StoresVec,
2523+
bool canFormVector(ArrayRef<StoreInst *> StoresVec,
25242524
OrdersType &ReorderIndices) const;
25252525

25262526
/// Iterates through the users of \p TE, looking for scalar stores that can be
@@ -4913,9 +4913,9 @@ void BoUpSLP::buildExternalUses(
49134913
}
49144914
}
49154915

4916-
DenseMap<Value *, SmallVector<StoreInst *, 4>>
4916+
DenseMap<Value *, SmallVector<StoreInst *>>
49174917
BoUpSLP::collectUserStores(const BoUpSLP::TreeEntry *TE) const {
4918-
DenseMap<Value *, SmallVector<StoreInst *, 4>> PtrToStoresMap;
4918+
DenseMap<Value *, SmallVector<StoreInst *>> PtrToStoresMap;
49194919
for (unsigned Lane : seq<unsigned>(0, TE->Scalars.size())) {
49204920
Value *V = TE->Scalars[Lane];
49214921
// To save compilation time we don't visit if we have too many users.
@@ -4954,14 +4954,14 @@ BoUpSLP::collectUserStores(const BoUpSLP::TreeEntry *TE) const {
49544954
return PtrToStoresMap;
49554955
}
49564956

4957-
bool BoUpSLP::canFormVector(const SmallVector<StoreInst *, 4> &StoresVec,
4957+
bool BoUpSLP::canFormVector(ArrayRef<StoreInst *> StoresVec,
49584958
OrdersType &ReorderIndices) const {
49594959
// We check whether the stores in StoreVec can form a vector by sorting them
49604960
// and checking whether they are consecutive.
49614961

49624962
// To avoid calling getPointersDiff() while sorting we create a vector of
49634963
// pairs {store, offset from first} and sort this instead.
4964-
SmallVector<std::pair<StoreInst *, int>, 4> StoreOffsetVec(StoresVec.size());
4964+
SmallVector<std::pair<StoreInst *, int>> StoreOffsetVec(StoresVec.size());
49654965
StoreInst *S0 = StoresVec[0];
49664966
StoreOffsetVec[0] = {S0, 0};
49674967
Type *S0Ty = S0->getValueOperand()->getType();
@@ -5030,7 +5030,7 @@ SmallVector<BoUpSLP::OrdersType, 1>
50305030
BoUpSLP::findExternalStoreUsersReorderIndices(TreeEntry *TE) const {
50315031
unsigned NumLanes = TE->Scalars.size();
50325032

5033-
DenseMap<Value *, SmallVector<StoreInst *, 4>> PtrToStoresMap =
5033+
DenseMap<Value *, SmallVector<StoreInst *>> PtrToStoresMap =
50345034
collectUserStores(TE);
50355035

50365036
// Holds the reorder indices for each candidate store vector that is a user of

0 commit comments

Comments
 (0)