-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ConstraintSystem] Guard all the performance hacks with a flag #82320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It's folded into a more general "disable performance hacks" one.
Package the flag into `performanceHacksEnabled()` method on `ConstraintSystem` and start using it to wrap all of the hacks in constraint generator and the solver.
@swift-ci please test |
@swift-ci please test Windows platform |
@swift-ci please test macOS platform |
@swift-ci please test Windows platform |
1 similar comment
@swift-ci please test Windows platform |
@swift-ci please test macOS platform |
auto &ctx = getASTContext(); | ||
assert(ctx.TypeCheckerOpts.DisableConstraintSolverPerformanceHacks || | ||
!solverState->BestScore || CurrentScore <= *solverState->BestScore); | ||
assert(!solverState->BestScore || CurrentScore <= *solverState->BestScore); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xedin i noticed during a recent rebase & build that the ctx
var is now marked unused after this change. was the new performanceHacksEnabled()
method intended to continue to be consulted in this assertion, or is it safe to delete the now-unused var?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s safe to remove the context variable!
Package the flag into
performanceHacksEnabled()
method onConstraintSystem
and start using it to wrap all of the hacksin constraint generator and the solver.
Replace
-disable-solver-shrink
with-disable-constraint-solver-performance-hacks
.