[llvm] [SLP] Use named structs in vectorizeStores() (NFC) (PR #132781)

Gaëtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 3 07:36:10 PDT 2025


================
@@ -19994,6 +19994,38 @@ static bool checkTreeSizes(ArrayRef<std::pair<unsigned, unsigned>> Sizes,
   return Dev * 96 / (Mean * Mean) == 0;
 }
 
+namespace {
+
+/// A group of instructions 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 {
----------------
gbossu wrote:

Okay even making `BaseInstrIdx` private is not straight-forward and goes beyond the scope of this change. 😞 As I said I have some plans to simplify `vectorizeStores()` further and use a bit more OOP, but I want to keep that initial patch simple and concise.

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


More information about the llvm-commits mailing list