diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-01-06 00:36:59 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-01-06 00:36:59 +0000 |
commit | 8260d0a9fabcc6358720c623a6e66a7b3f6a9f8a (patch) | |
tree | 4dfc8abf753aa38e3ff3a95b243502e86721f7c0 | |
parent | 0167e064f3ae2956ca04511fe19344a30a9141c7 (diff) | |
download | bcm5719-llvm-8260d0a9fabcc6358720c623a6e66a7b3f6a9f8a.tar.gz bcm5719-llvm-8260d0a9fabcc6358720c623a6e66a7b3f6a9f8a.zip |
use std::max ; NFCI
llvm-svn: 256889
-rw-r--r-- | llvm/lib/CodeGen/RegisterPressure.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegisterPressure.cpp b/llvm/lib/CodeGen/RegisterPressure.cpp index 8382b0912bd..3749b1dd217 100644 --- a/llvm/lib/CodeGen/RegisterPressure.cpp +++ b/llvm/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]); } } } |