[llvm] [SLP][NFC] Redesign schedule bundle, separate from schedule data, NFC (PR #131625)

Gaƫtan Bossu via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 19 07:46:01 PDT 2025


================
@@ -4397,20 +4566,17 @@ class BoUpSLP {
 
     /// Build a bundle from the ScheduleData nodes corresponding to the
     /// scalar instruction for each lane.
-    ScheduleData *buildBundle(ArrayRef<Value *> VL);
+    ScheduleBundle &buildBundle(ArrayRef<Value *> VL);
 
     /// Checks if a bundle of instructions can be scheduled, i.e. has no
     /// cyclic dependencies. This is only a dry-run, no instructions are
     /// actually moved at this stage.
     /// \returns the scheduling bundle. The returned Optional value is not
     /// std::nullopt if \p VL is allowed to be scheduled.
-    std::optional<ScheduleData *>
+    std::optional<ScheduleBundle *>
----------------
gbossu wrote:

Could that just use `ScheduleBundle *` as a return type? I.e. replacing `std::nullopt` with `nullptr` 

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


More information about the llvm-commits mailing list