[llvm] [SandboxVectorizer] New class to actually collect and manage seeds (PR #112979)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 16:53:56 PDT 2024


================
@@ -284,6 +284,36 @@ class SeedContainer {
 #endif // NDEBUG
 };
 
+class SeedCollector {
+  SeedContainer StoreSeeds;
+  SeedContainer LoadSeeds;
+  BasicBlock *BB;
+  Context &Ctx;
+
+  /// \Returns the number of SeedBundle groups for all seed types.
+  /// This is to be used for limiting compilation time.
+  unsigned totalNumSeedGroups() const {
+    return StoreSeeds.size() + LoadSeeds.size();
+  }
+
+public:
+  SeedCollector(BasicBlock *SBBB, ScalarEvolution &SE);
+  ~SeedCollector();
+
+  BasicBlock *getBasicBlock() { return BB; }
----------------
Sterling-Augustine wrote:

I suspect it will be useful for dumping, and possibly to manage the remove instruction callback somewhat more intelligently than registering and unregistering every basic. But block, but for now it has no uses.

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


More information about the llvm-commits mailing list