[llvm] [MachineScheduler][NFCI] Add Offset and OffsetIsScalable args to shouldClusterMemOps (PR #73778)

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 04:50:30 PST 2023


================
@@ -1496,12 +1496,18 @@ class TargetInstrInfo : public MCInstrInfo {
   /// to TargetPassConfig::createMachineScheduler() to have an effect.
   ///
   /// \p BaseOps1 and \p BaseOps2 are memory operands of two memory operations.
+  /// \p Offset1 and \p Offset2 are the byte offsets for the memory
----------------
fpetrogalli wrote:

How about using one parameter of type ElementCount for each pair of parameters (int,bool)? So that the signature simplifies to:

```
virtual bool shouldClusterMemOps(ArrayRef<const MachineOperand *> BaseOps1,
                                    ElementCount Offset1,
                                    ArrayRef<const MachineOperand *> BaseOps2,
                                    ElementCount Offset2,
                                    unsigned ClusterSize,
                                    unsigned NumBytes) const {
```

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


More information about the llvm-commits mailing list