diff options
author | Andrew Trick <atrick@apple.com> | 2012-05-24 22:11:01 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-05-24 22:11:01 +0000 |
commit | c8fe4ecb47644e76f5e38b8b75997912554a24a3 (patch) | |
tree | 1550e2817c3818d73c54c3bd1d7bb5560a34ff19 /lib/CodeGen/MachineScheduler.cpp | |
parent | 5f887fab35cd71a1e6fcbfa64ae5cbbf43b39807 (diff) |
misched: copy comments so compareRPDelta is readable by itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | lib/CodeGen/MachineScheduler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineScheduler.cpp b/lib/CodeGen/MachineScheduler.cpp index 207d65a6b9..659b5ca3e2 100644 --- a/lib/CodeGen/MachineScheduler.cpp +++ b/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 |