Push PrepareNodeInfo/IdentifyGroups down the inheritance hierarchy
authorChris Lattner <sabre@nondot.org>
Fri, 10 Mar 2006 06:34:51 +0000 (06:34 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 10 Mar 2006 06:34:51 +0000 (06:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26682 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
lib/CodeGen/SelectionDAG/ScheduleDAGSimple.cpp

index d6255db9c1c777ac739ed274b8edd9df8c59209a..67dbec16c5e7ce81390ec7b7e8a452172c129169 100644 (file)
@@ -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;
index bcbd96a098946b0a09331498c49b458a8f11ce80..065b127486cba146013e836f76c957394518ab94 100644 (file)
@@ -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();
   
index 55b68f883014ee47a34a4bafccaad92daf7c8ee3..b0593a32041c1c1b7c56b50f9e0f853f13ff298e 100644 (file)
@@ -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