[PATCH] D59480: [NFC] Add SchedState to allow forwarding the Scheduling state between MBB

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


fhahn added a comment.

Thanks for the update. I think it's better structured now for preserving the relevant state. It would be good to see if @atrick and @MatzeB are happy with that direction as well.



================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1853
 
+SchedState::SchedState() :
+  CurrCycle(0), CurrMOps(0),
----------------
I guess this could go into the header.


================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1941
   unsigned ReadyCycle = (isTop() ? SU->TopReadyCycle : SU->BotReadyCycle);
-  if (ReadyCycle > CurrCycle)
-    return ReadyCycle - CurrCycle;
+  if (ReadyCycle > State.CurrCycle)
+    return ReadyCycle - State.CurrCycle;
----------------
I guess with this change, it would also make sense to use the getXXX functions here and elsewhere, instead of manually getting them from State.


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

https://reviews.llvm.org/D59480





More information about the llvm-commits mailing list