projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9fcc06d
)
use std::max ; NFCI
author
Sanjay Patel
<spatel@rotateright.com>
Wed, 6 Jan 2016 00:36:59 +0000
(
00:36
+0000)
committer
Sanjay Patel
<spatel@rotateright.com>
Wed, 6 Jan 2016 00:36:59 +0000
(
00:36
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256889
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/RegisterPressure.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/RegisterPressure.cpp
b/lib/CodeGen/RegisterPressure.cpp
index 8382b0912bdec911083f373d5db9a7f500b45645..3749b1dd217a792673f71ce3cd95c7b24b2326d0 100644
(file)
--- 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]);
}
}
}