[llvm-commits] [llvm] r81112 - /llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp

Benjamin Kramer benny.kra at googlemail.com
Sun Sep 6 05:10:17 PDT 2009


Author: d0k
Date: Sun Sep  6 07:10:17 2009
New Revision: 81112

URL: http://llvm.org/viewvc/llvm-project?rev=81112&view=rev
Log:
It's a bool, so treat it like one. Fixes a MSVC warning.

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

Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=81112&r1=81111&r2=81112&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Sun Sep  6 07:10:17 2009
@@ -987,7 +987,7 @@
 
   // In any cycle where we can't schedule any instructions, we must
   // stall or emit a noop, depending on the target.
-  bool CycleInstCnt = 0;
+  bool CycleHasInsts = false;
 
   // While Available queue is not empty, grab the node with the highest
   // priority. If it is not ready put it back.  Schedule the node.
@@ -1045,7 +1045,7 @@
     if (FoundSUnit) {
       ScheduleNodeTopDown(FoundSUnit, CurCycle);
       HazardRec->EmitInstruction(FoundSUnit);
-      CycleInstCnt++;
+      CycleHasInsts = true;
 
       // If we are using the target-specific hazards, then don't
       // advance the cycle time just because we schedule a node. If
@@ -1056,7 +1056,7 @@
           ++CurCycle;
       }
     } else {
-      if (CycleInstCnt > 0) {
+      if (CycleHasInsts) {
         DEBUG(errs() << "*** Finished cycle " << CurCycle << '\n');
         HazardRec->AdvanceCycle();
       } else if (!HasNoopHazards) {
@@ -1076,7 +1076,7 @@
       }
 
       ++CurCycle;
-      CycleInstCnt = 0;
+      CycleHasInsts = false;
     }
   }
 





More information about the llvm-commits mailing list