Skip to content

Commit 641b80b

Browse files
committed
[CSSolver] Remove tuple-to-tuple narrow perf hack
Don't try to short-circuit disjunctions if one of the choices produced tuple-to-tuple conversion since that doesn't mean that there are no other choices out there.
1 parent 3901fa8 commit 641b80b

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/Sema/CSSolver.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,7 @@ static bool shortCircuitDisjunctionAt(Constraint *constraint,
17251725

17261726
return true;
17271727
}
1728-
1728+
17291729
// Anything without a fix is better than anything with a fix.
17301730
if (constraint->getFix() && !successfulConstraint->getFix())
17311731
return true;
@@ -1991,13 +1991,6 @@ bool ConstraintSystem::solveSimplified(
19911991
}
19921992

19931993
lastSolvedChoice = {currentChoice, *score};
1994-
1995-
// If we see a tuple-to-tuple conversion that succeeded, we're done.
1996-
// FIXME: This should be more general.
1997-
if (auto restriction = currentChoice->getRestriction()) {
1998-
if (*restriction == ConversionRestrictionKind::TupleToTuple)
1999-
break;
2000-
}
20011994
}
20021995

20031996
if (TC.getLangOpts().DebugConstraintSolver) {

0 commit comments

Comments
 (0)