diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:01:02 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-01-06 20:01:02 +0000 |
| commit | 8a6c1c25bce0267ee4072bd7b786b921e8a66a35 (patch) | |
| tree | ea70b740d40cffe568a990c7aecd1acb5f83f786 /lib/CodeGen/RegisterPressure.cpp | |
| parent | 84fe440ded1bfc237d720c49408b36798d67ceff (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/RegisterPressure.cpp')
| -rw-r--r-- | lib/CodeGen/RegisterPressure.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/RegisterPressure.cpp b/lib/CodeGen/RegisterPressure.cpp index 8382b0912bde..3749b1dd217a 100644 --- a/lib/CodeGen/RegisterPressure.cpp +++ b/lib/CodeGen/RegisterPressure.cpp @@ -97,9 +97,8 @@ void RegPressureTracker::increaseRegPressure(ArrayRef<unsigned> RegUnits) { unsigned Weight = PSetI.getWeight(); for (; PSetI.isValid(); ++PSetI) { CurrSetPressure[*PSetI] += Weight; - if (CurrSetPressure[*PSetI] > P.MaxSetPressure[*PSetI]) { - P.MaxSetPressure[*PSetI] = CurrSetPressure[*PSetI]; - } + P.MaxSetPressure[*PSetI] = + std::max(P.MaxSetPressure[*PSetI], CurrSetPressure[*PSetI]); } } } |
