[PATCH] D72392: [MachineScheduler] Fix the TopDepth/BotHeightReduce latency heuristics

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 09:03:38 PDT 2020


fhahn accepted this revision.
fhahn added a comment.

Looks reasonable, thanks for adding the MIR test as well. Sorry for the delay, it dropped off my radar.



================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:2685
   if (Zone.isTop()) {
-    if (Cand.SU->getDepth() > Zone.getScheduledLatency()) {
+    if (std::max(TryCand.SU->getDepth(), Cand.SU->getDepth()) >
+        Zone.getScheduledLatency()) {
----------------
It might be good to add a comment here explaining what we are checking here. (same as below).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72392





More information about the llvm-commits mailing list