Files
swift-mirror/include/swift/Sema/ConstraintSolverStats.def
Slava Pestov c8415aeac4 Sema: Record the trail step count in solver statistics
Also introduce two new frontend flags:

The -solver-scope-threshold flag sets the maximum number of scopes, which was
previously hardcoded to 1 million.

The -solver-trail-threshold flag sets the maximum number of trail steps,
which defaults to 64 million.
2024-11-20 13:46:19 -05:00

33 lines
1.5 KiB
Modula-2

//===--- ConstraintSolverStats.def - Constraint Solver Statistics ---------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 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
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file enumerates the statistics tracked by the constraint solver.
//
//===----------------------------------------------------------------------===//
#ifndef CS_STATISTIC
# error #define CS_STATISTIC(Name, Description) before including
#endif
CS_STATISTIC(NumTypeVariablesBound, "# of type variables bound")
CS_STATISTIC(NumTypeVariableBindings, "# of type variable bindings attempted")
CS_STATISTIC(NumDisjunctions, "# of disjunctions explored")
CS_STATISTIC(NumDisjunctionTerms, "# of disjunction terms explored")
CS_STATISTIC(NumConjunctionTerms, "# of conjunction terms explored")
CS_STATISTIC(NumSimplifiedConstraints, "# of constraints simplified")
CS_STATISTIC(NumUnsimplifiedConstraints, "# of constraints not simplified")
CS_STATISTIC(NumSimplifyIterations, "# of simplification iterations")
CS_STATISTIC(NumSolverScopes, "# of solution states explored")
CS_STATISTIC(NumTrailSteps, "# of changes recorded in the trail")
CS_STATISTIC(NumComponentsSplit, "# of connected components split")
#undef CS_STATISTIC