mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a frontend option to disable the "shrink" part of the solver.
We sometimes see expression type checking times increase dramatically when this is enabled, and having a way to disable will make it possible to easily do measurements to determine the cost/benefit of having this enabled.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
||||
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
|
||||
// Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
//
|
||||
// See https://swift.org/LICENSE.txt for license information
|
||||
@@ -279,6 +279,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
Opts.SolverShrinkUnsolvedThreshold = threshold;
|
||||
}
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_solver_disable_shrink))
|
||||
Opts.SolverDisableShrink = true;
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_value_recursion_threshold)) {
|
||||
unsigned threshold;
|
||||
if (StringRef(A->getValue()).getAsInteger(10, threshold)) {
|
||||
|
||||
Reference in New Issue
Block a user