[PATCH] D61248: [NFC] Add the infrastructure to forward the scheduled state between MBB

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 03:28:53 PDT 2019


fhahn added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachineScheduler.h:304
   bool doMBBSchedRegionsTopDown() const override {
-    return SchedImpl->doMBBSchedRegionsTopDown();
+    return MF.getSubtarget().forwardScheduledState();
   }
----------------
IIUC this would drop the way to specify this via the scheduling policy and could change behavior for existing policies around.

It might make sense to have state forwarding imply top down here (`SchedImpl->doMBBSchedRegionsTopDown() || MF.getSubtarget().forwardScheduledState()`)


================
Comment at: llvm/include/llvm/CodeGen/TargetSubtargetInfo.h:197
+  /// Return true if scheduled state is forwarded between MBBs. 
+  virtual bool forwardScheduledState() const { return false; }
+
----------------
Is there a benefit of putting this setting in here, rather than in the scheduling policy, like similar settings? Unless I am missing something, I think it would be more suitable in the scheduling policy, where we already have similar options.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61248/new/

https://reviews.llvm.org/D61248





More information about the llvm-commits mailing list