summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-03-13 18:32:10 +0000
committerdim <dim@FreeBSD.org>2016-03-13 18:32:10 +0000
commite5fe1cf6c0803bc71a80074e660e36b7bbfaf2c1 (patch)
tree1a287a68fc209c70fe2d5f6114f53093cf085cbb
parent106d18f4e3e23b2fcb78ab5a496123bd446f48a2 (diff)
downloadFreeBSD-src-e5fe1cf6c0803bc71a80074e660e36b7bbfaf2c1.zip
FreeBSD-src-e5fe1cf6c0803bc71a80074e660e36b7bbfaf2c1.tar.gz
Pull in r219512 from upstream llvm trunk (by Hal Finkel):
[MiSched] Fix a logic error in tryPressure() Fixes a logic error in the MachineScheduler found by Steve Montgomery (and confirmed by Andy). This has gone unfixed for months because the fix has been found to introduce some small performance regressions. However, Andy has recommended that, at this point, we fix this to avoid further dependence on the incorrect behavior (and then follow-up separately on any regressions), and I agree. Fixes PR18883. This fixes a possible "ran out of registers" error when compiling www/firefox 45.0 on i386. Direct commit to stable/10, because head already has this fix since the llvm/clang 3.6.0 import. PR: 207837
-rw-r--r--contrib/llvm/lib/CodeGen/MachineScheduler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/llvm/lib/CodeGen/MachineScheduler.cpp b/contrib/llvm/lib/CodeGen/MachineScheduler.cpp
index e71c4df..96e3802 100644
--- a/contrib/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/contrib/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -2365,8 +2365,8 @@ static bool tryPressure(const PressureChange &TryP,
}
// If one candidate decreases and the other increases, go with it.
// Invalid candidates have UnitInc==0.
- if (tryLess(TryP.getUnitInc() < 0, CandP.getUnitInc() < 0, TryCand, Cand,
- Reason)) {
+ if (tryGreater(TryP.getUnitInc() < 0, CandP.getUnitInc() < 0, TryCand, Cand,
+ Reason)) {
return true;
}
// If the candidates are decreasing pressure, reverse priority.
OpenPOWER on IntegriCloud