[llvm] r326716 - [MachineScheduler] Dump SUnits before calling SchedImpl->initialize()

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 08:31:50 PST 2018


Author: jonpa
Date: Mon Mar  5 08:31:49 2018
New Revision: 326716

URL: http://llvm.org/viewvc/llvm-project?rev=326716&view=rev
Log:
[MachineScheduler] Dump SUnits before calling SchedImpl->initialize()

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.

Review: Javed Absar
https://reviews.llvm.org/D44089

Modified:
    llvm/trunk/lib/CodeGen/MachineScheduler.cpp

Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=326716&r1=326715&r2=326716&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Mon Mar  5 08:31:49 2018
@@ -762,10 +762,6 @@ void ScheduleDAGMI::schedule() {
   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 @@ void ScheduleDAGMI::schedule() {
   );
   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);
 




More information about the llvm-commits mailing list