[llvm-commits] [llvm] r157424 - /llvm/trunk/lib/CodeGen/MachineScheduler.cpp

Andrew Trick atrick at apple.com
Thu May 24 15:11:01 PDT 2012


Author: atrick
Date: Thu May 24 17:11:01 2012
New Revision: 157424

URL: http://llvm.org/viewvc/llvm-project?rev=157424&view=rev
Log:
misched: copy comments so compareRPDelta is readable by itself.

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=157424&r1=157423&r2=157424&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Thu May 24 17:11:01 2012
@@ -815,19 +815,22 @@
   // Compare each component of pressure in decreasing order of importance
   // without checking if any are valid. Invalid PressureElements are assumed to
   // have UnitIncrease==0, so are neutral.
+
+  // Avoid increasing the max critical pressure in the scheduled region.
   if (LHS.Excess.UnitIncrease != RHS.Excess.UnitIncrease)
     return LHS.Excess.UnitIncrease < RHS.Excess.UnitIncrease;
 
+  // Avoid increasing the max critical pressure in the scheduled region.
   if (LHS.CriticalMax.UnitIncrease != RHS.CriticalMax.UnitIncrease)
     return LHS.CriticalMax.UnitIncrease < RHS.CriticalMax.UnitIncrease;
 
+  // Avoid increasing the max pressure of the entire region.
   if (LHS.CurrentMax.UnitIncrease != RHS.CurrentMax.UnitIncrease)
     return LHS.CurrentMax.UnitIncrease < RHS.CurrentMax.UnitIncrease;
 
   return false;
 }
 
-
 /// Pick the best candidate from the top queue.
 ///
 /// TODO: getMaxPressureDelta results can be mostly cached for each SUnit during





More information about the llvm-commits mailing list