[llvm] r184031 - MI-Sched: Rename IssueCount to CurrMOps.

Andrew Trick atrick at apple.com
Fri Jun 14 21:49:49 PDT 2013


Author: atrick
Date: Fri Jun 14 23:49:49 2013
New Revision: 184031

URL: http://llvm.org/viewvc/llvm-project?rev=184031&view=rev
Log:
MI-Sched: Rename IssueCount to CurrMOps.

"Counts" refer to scaled resource counts within a region. CurrMOps is
simply the number of micro-ops to be issue in the current cycle.

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=184031&r1=184030&r2=184031&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Fri Jun 14 23:49:49 2013
@@ -1232,7 +1232,7 @@ public:
     ScheduleHazardRecognizer *HazardRec;
 
     unsigned CurrCycle;
-    unsigned IssueCount;
+    unsigned CurrMOps;
 
     /// MinReadyCycle - Cycle of the soonest available instruction.
     unsigned MinReadyCycle;
@@ -1271,7 +1271,7 @@ public:
       NextSUs.clear();
       HazardRec = 0;
       CurrCycle = 0;
-      IssueCount = 0;
+      CurrMOps = 0;
       MinReadyCycle = UINT_MAX;
       ExpectedLatency = 0;
       DependentLatency = 0;
@@ -1527,7 +1527,7 @@ bool ConvergingScheduler::SchedBoundary:
     return HazardRec->getHazardType(SU) != ScheduleHazardRecognizer::NoHazard;
 
   unsigned uops = SchedModel->getNumMicroOps(SU->getInstr());
-  if ((IssueCount > 0) && (IssueCount + uops > SchedModel->getIssueWidth())) {
+  if ((CurrMOps > 0) && (CurrMOps + uops > SchedModel->getIssueWidth())) {
     DEBUG(dbgs() << "  SU(" << SU->NodeNum << ") uops="
           << SchedModel->getNumMicroOps(SU->getInstr()) << '\n');
     return true;
@@ -1590,12 +1590,12 @@ void ConvergingScheduler::SchedBoundary:
 /// Move the boundary of scheduled code by one cycle.
 void ConvergingScheduler::SchedBoundary::bumpCycle() {
   unsigned Width = SchedModel->getIssueWidth();
-  IssueCount = (IssueCount <= Width) ? 0 : IssueCount - Width;
+  CurrMOps = (CurrMOps <= Width) ? 0 : CurrMOps - Width;
 
   unsigned NextCycle = CurrCycle + 1;
   assert(MinReadyCycle < UINT_MAX && "MinReadyCycle uninitialized");
   if (MinReadyCycle > NextCycle) {
-    IssueCount = 0;
+    CurrMOps = 0;
     NextCycle = MinReadyCycle;
   }
   if ((NextCycle - CurrCycle) > DependentLatency)
@@ -1679,14 +1679,14 @@ void ConvergingScheduler::SchedBoundary:
 
   // Check the instruction group dispatch limit.
   // TODO: Check if this SU must end a dispatch group.
-  IssueCount += SchedModel->getNumMicroOps(SU->getInstr());
+  CurrMOps += SchedModel->getNumMicroOps(SU->getInstr());
 
   // checkHazard prevents scheduling multiple instructions per cycle that exceed
   // issue width. However, we commonly reach the maximum. In this case
   // opportunistically bump the cycle to avoid uselessly checking everything in
   // the readyQ. Furthermore, a single instruction may produce more than one
   // cycle's worth of micro-ops.
-  if (IssueCount >= SchedModel->getIssueWidth()) {
+  if (CurrMOps >= SchedModel->getIssueWidth()) {
     DEBUG(dbgs() << "  *** Max instrs at cycle " << CurrCycle << '\n');
     bumpCycle();
   }
@@ -1739,7 +1739,7 @@ SUnit *ConvergingScheduler::SchedBoundar
   if (CheckPending)
     releasePending();
 
-  if (IssueCount > 0) {
+  if (CurrMOps > 0) {
     // Defer any ready instrs that now have a hazard.
     for (ReadyQueue::iterator I = Available.begin(); I != Available.end();) {
       if (checkHazard(*I)) {





More information about the llvm-commits mailing list