[llvm] [AArch64] Improve scheduling latency into Bundles (PR #86310)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 23:34:52 PDT 2024


================
@@ -235,7 +235,9 @@ class TargetSubtargetInfo : public MCSubtargetInfo {
   // and UseOpIdx are the indices of the operands in Def and Use, respectively.
   // Otherwise, either may be -1.
   virtual void adjustSchedDependency(SUnit *Def, int DefOpIdx, SUnit *Use,
-                                     int UseOpIdx, SDep &Dep) const {}
+                                     int UseOpIdx, SDep &Dep,
+                                     const TargetSchedModel *SchedModel) const {
----------------
david-arm wrote:

If that's the case then passing in the SchedModel as a parameter definitely seems preferable to creating a second copy in AArch64Subtarget. What I was wondering was - is there a way to stash the SchedModel passed in to adjustSchedDependency directly in the subtarget class itself? Maybe that's not easy due to the way it's set up, but I just thought it might avoid changing the interface. If it's too difficult that's fine and I'll accept the patch!

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


More information about the llvm-commits mailing list