summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2012-05-24 22:11:01 +0000
committerAndrew Trick <atrick@apple.com>2012-05-24 22:11:01 +0000
commitf378617773fecebebdf2eeeb7e0fae04e38b60cf (patch)
tree5baaadf5a839c567db0526c11781a6d4c3d751b3 /llvm/lib/CodeGen/MachineScheduler.cpp
parentd5326aea816872588c0979ea231894c8cb1ba314 (diff)
downloadbcm5719-llvm-f378617773fecebebdf2eeeb7e0fae04e38b60cf.tar.gz
bcm5719-llvm-f378617773fecebebdf2eeeb7e0fae04e38b60cf.zip
misched: copy comments so compareRPDelta is readable by itself.
llvm-svn: 157424
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index 207d65a6b94..659b5ca3e25 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -815,19 +815,22 @@ static bool compareRPDelta(const RegPressureDelta &LHS,
// 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
OpenPOWER on IntegriCloud