svn commit: r296801 - stable/9/contrib/llvm/lib/CodeGen

Dimitry Andric dim at FreeBSD.org
Sun Mar 13 18:32:19 UTC 2016


Author: dim
Date: Sun Mar 13 18:32:18 2016
New Revision: 296801
URL: https://svnweb.freebsd.org/changeset/base/296801

Log:
  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/9, because head already has this fix since the
  llvm/clang 3.6.0 import.
  
  PR:		207837

Modified:
  stable/9/contrib/llvm/lib/CodeGen/MachineScheduler.cpp

Modified: stable/9/contrib/llvm/lib/CodeGen/MachineScheduler.cpp
==============================================================================
--- stable/9/contrib/llvm/lib/CodeGen/MachineScheduler.cpp	Sun Mar 13 18:32:10 2016	(r296800)
+++ stable/9/contrib/llvm/lib/CodeGen/MachineScheduler.cpp	Sun Mar 13 18:32:18 2016	(r296801)
@@ -2365,8 +2365,8 @@ static bool tryPressure(const PressureCh
   }
   // 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.


More information about the svn-src-all mailing list