From bc32f7db8588cac8b322c5af630a0f458d3be385 Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Mon, 5 Mar 2018 16:31:49 +0000 Subject: [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 llvm-svn: 326716 --- llvm/lib/CodeGen/MachineScheduler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp') diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index f37479ea964..726a3b93375 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -762,10 +762,6 @@ void ScheduleDAGMI::schedule() { SmallVector 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); -- cgit v1.2.3