[ty] Track constraint set "support" separately; go back to fully reduced BDDs#22578
Draft
[ty] Track constraint set "support" separately; go back to fully reduced BDDs#22578
Conversation
Typing conformance resultsNo changes detected ✅ |
|
CodSpeed Performance ReportMerging this PR will not alter performanceComparing Summary
|
dcf8097 to
33bd081
Compare
5b240fb to
6555491
Compare
33bd081 to
a33870d
Compare
70751f8 to
73e182d
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts our short-lived experiment with quasi-reduced BDDs. We introduced quasi-reduction in #21744 in an attempt to remove some non-determinism in our tests. This non-determinism came about because a constraint set BDD might contain different sets of individual constraints depending on the (arbitrary) BDD variable ordering that is in force for a particular run of
ty. Quasi-reduction ensured that all of the constraints explicitly mentioned when constructing a constraint set actually appeared in the BDD structure, giving us a deterministic set of constraints to iterate over.However, that came at the cost of much bigger BDDs! Large enough, in fact, that it was causing untenable performance regressions on #21902.
This PR is a different take on the problem. We now explicitly track the set of constraints that are mentioned when constructing a constraint set. This is called the constraint set's support, and is an additional (salsa-interned) field in
ConstraintSet. Tracking that separately means that we can go back to fully reduced BDDs, since have a different way to iterate through the constraint set's support when we need to.This depends on #22577.