[llvm] [SLP] More OOP to simplify vectorizeStores() (NFC) (PR #134605)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 06:22:13 PDT 2025
================
@@ -20341,9 +20341,15 @@ namespace {
/// A group of stores that we'll try to bundle together using vector ops.
/// They are ordered using the signed distance of their address operand to the
/// address of this group's BaseInstr.
-struct RelatedStoreInsts {
- RelatedStoreInsts(unsigned BaseInstrIdx) { reset(BaseInstrIdx); }
+class RelatedStoreInsts {
+public:
+ RelatedStoreInsts(unsigned BaseInstrIdx, ArrayRef<StoreInst *> AllStores)
+ : AllStores(AllStores) {
+ reset(BaseInstrIdx);
+ }
+
void reset(unsigned NewBaseInstr) {
+ assert(NewBaseInstr < AllStores.size());
----------------
alexey-bataev wrote:
Add a message
https://github.com/llvm/llvm-project/pull/134605
More information about the llvm-commits
mailing list