[PATCH] D65506: [MachineScheduler] improve reuse of 'releaseNode'method

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 11:11:46 PDT 2019


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:2101
   bool IsBuffered = SchedModel->getMicroOpBufferSize() != 0;
-  if ((!IsBuffered && ReadyCycle > CurrCycle) || checkHazard(SU) ||
-      Available.size() >= ReadyListLimit)
-    Pending.push(SU);
-  else
+  bool HazardDetected = ((!IsBuffered && ReadyCycle > CurrCycle) ||
+                         checkHazard(SU));
----------------
nit: outermost brackets unnecessary.


================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:2106
+  // See 'SchedBoundary::releasePending'.
+  if (!InPQueue)
+    HazardDetected = HazardDetected || Available.size() >= ReadyListLimit;
----------------
nit: IMO it would be slightly simpler to keep the check of Available.size() unconditional, as the runtime benefits should be very negligible 


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

https://reviews.llvm.org/D65506





More information about the llvm-commits mailing list