Skip to content

Commit 833b6b1

Browse files
committed
[Frontend] Remove -disable-solver-shrink option
It's folded into a more general "disable performance hacks" one.
1 parent 00aa22f commit 833b6b1

File tree

7 files changed

+4
-14
lines changed

7 files changed

+4
-14
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,9 +975,6 @@ namespace swift {
975975
/// is for testing purposes.
976976
std::vector<std::string> DebugForbidTypecheckPrefixes;
977977

978-
/// Disable the shrink phase of the expression type checker.
979-
bool SolverDisableShrink = false;
980-
981978
/// Enable experimental operator designated types feature.
982979
bool EnableOperatorDesignatedTypes = false;
983980

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -852,10 +852,6 @@ def solver_scope_threshold_EQ : Joined<["-"], "solver-scope-threshold=">,
852852
def solver_trail_threshold_EQ : Joined<["-"], "solver-trail-threshold=">,
853853
HelpText<"Expression type checking trail change limit">;
854854

855-
def solver_disable_shrink :
856-
Flag<["-"], "solver-disable-shrink">,
857-
HelpText<"Disable the shrink phase of expression type checking">;
858-
859855
def solver_disable_splitter : Flag<["-"], "solver-disable-splitter">,
860856
HelpText<"Disable the component splitter phase of expression type checking">;
861857

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,9 +2015,6 @@ static bool ParseTypeCheckerArgs(TypeCheckerOptions &Opts, ArgList &Args,
20152015
Opts.DebugForbidTypecheckPrefixes.push_back(A);
20162016
}
20172017

2018-
if (Args.getLastArg(OPT_solver_disable_shrink))
2019-
Opts.SolverDisableShrink = true;
2020-
20212018
if (Args.getLastArg(OPT_solver_disable_splitter))
20222019
Opts.SolverDisableSplitter = true;
20232020

lib/Sema/CSSolver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ void ConstraintSystem::Candidate::applySolutions(
983983
}
984984

985985
void ConstraintSystem::shrink(Expr *expr) {
986-
if (getASTContext().TypeCheckerOpts.SolverDisableShrink)
986+
if (getASTContext().TypeCheckerOpts.DisableConstraintSolverPerformanceHacks)
987987
return;
988988

989989
using DomainMap = llvm::SmallDenseMap<Expr *, ArrayRef<ValueDecl *>>;

validation-test/Sema/type_checker_perf/fast/array_concatenation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -solver-disable-shrink
1+
// RUN: %target-typecheck-verify-swift -disable-constraint-solver-performance-hacks
22

33
// Self-contained test case
44
protocol P1 {}; func f<T: P1>(_: T, _: T) -> T { fatalError() }

validation-test/Sema/type_checker_perf/fast/property_vs_unapplied_func.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1 -solver-disable-shrink
1+
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
22
// REQUIRES: tools-release,no_asan
33

44
struct Date {

validation-test/Sema/type_checker_perf/slow/rdar26564101.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1 -solver-disable-shrink
1+
// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1 -disable-constraint-solver-performance-hacks
22
// REQUIRES: tools-release,no_asan
33
// UNSUPPORTED: swift_test_mode_optimize_none && OS=linux-gnu
44

0 commit comments

Comments
 (0)