[PATCH] D44089: [MachineScheduler] Dump SUnits before calling SchedImpl->initialize()

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 06:18:11 PST 2018


jonpa created this revision.
jonpa added reviewers: fhahn, MatzeB, atrick.
Herald added a subscriber: javed.absar.

This is a NFC simple patch that changes the DEBUG dumping in the MachineScheduler so that the dumping of the built SUnits is done before the SchedImpl->initialize() is called.

This is better on SystemZ, since it has a strategy that does some dumping at the start of the region, and it is not possible to easily read it if it is output above a long list of SU.

Is this OK for everyone?


https://reviews.llvm.org/D44089

Files:
  lib/CodeGen/MachineScheduler.cpp


Index: lib/CodeGen/MachineScheduler.cpp
===================================================================
--- lib/CodeGen/MachineScheduler.cpp
+++ lib/CodeGen/MachineScheduler.cpp
@@ -762,10 +762,6 @@
   SmallVector<SUnit*, 8> TopRoots, BotRoots;
   findRootsAndBiasEdges(TopRoots, BotRoots);
 
-  // Initialize the strategy before modifying the DAG.
-  // This may initialize a DFSResult to be used for queue priority.
-  SchedImpl->initialize(this);
-
   DEBUG(
     if (EntrySU.getInstr() != nullptr)
       EntrySU.dumpAll(this);
@@ -776,6 +772,10 @@
   );
   if (ViewMISchedDAGs) viewGraph();
 
+  // Initialize the strategy before modifying the DAG.
+  // This may initialize a DFSResult to be used for queue priority.
+  SchedImpl->initialize(this);
+
   // Initialize ready queues now that the DAG and priority data are finalized.
   initQueues(TopRoots, BotRoots);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44089.136987.patch
Type: text/x-patch
Size: 878 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180305/cb9f1cac/attachment.bin>


More information about the llvm-commits mailing list