From be24e5996c9cb06c6af5d9c86d1181b62a3a8393 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 10 Mar 2006 06:34:51 +0000 Subject: [PATCH] Push PrepareNodeInfo/IdentifyGroups down the inheritance hierarchy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26682 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 4 ---- lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp | 5 +++++ lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index d6255db9c1c..67dbec16c5e 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp @@ -498,10 +498,6 @@ MachineBasicBlock *ScheduleDAG::Run() { // Number the nodes NodeCount = std::distance(DAG.allnodes_begin(), DAG.allnodes_end()); - // Set up minimum info for scheduling - PrepareNodeInfo(); - // Construct node groups for flagged nodes - IdentifyGroups(); Schedule(); return BB; diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp index bcbd96a0989..065b127486c 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp @@ -640,6 +640,11 @@ void ScheduleDAGList::dumpSchedule() const { void ScheduleDAGList::Schedule() { DEBUG(std::cerr << "********** List Scheduling **********\n"); + // Set up minimum info for scheduling + PrepareNodeInfo(); + // Construct node groups for flagged nodes + IdentifyGroups(); + // Build scheduling units. BuildSchedUnits(); diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp index 55b68f88301..b0593a32041 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp @@ -560,6 +560,11 @@ void ScheduleDAGSimple::ScheduleForward() { /// Schedule - Order nodes according to selected style. /// void ScheduleDAGSimple::Schedule() { + // Set up minimum info for scheduling + PrepareNodeInfo(); + // Construct node groups for flagged nodes + IdentifyGroups(); + // Test to see if scheduling should occur bool ShouldSchedule = NodeCount > 3 && Heuristic != noScheduling; // Don't waste time if is only entry and return -- 2.34.1