[llvm] [SLP][modularisation][NFC] Move clusterSortPtrAccesses to SLPMemoryUtils (PR #222235)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 05:25:50 PDT 2026


================
@@ -90,6 +91,14 @@ bool isMaskedStoreCompress(ArrayRef<Value *> VL, ArrayRef<Value *> PointerOps,
                            SmallVectorImpl<int> &ReuseShuffleIndices,
                            FixedVectorType *&StoreVecTy);
 
+/// Clusters \p VL pointers by underlying object and sorts each cluster by
+/// offset, producing \p SortedIndices when the accesses are consecutive.
+/// \p MaxDepth is the recursion limit for getUnderlyingObject.
----------------
alexey-bataev wrote:

```suggestion
/// Clusters \p VL pointers by (basic block, underlying object) pair and sorts
/// each cluster by offset. Returns false and leaves \p SortedIndices empty if
/// the accesses are not worth reordering.
```

https://github.com/llvm/llvm-project/pull/222235


More information about the llvm-commits mailing list