Encode constraints that hold at all points as logical edges in location-sensitive polonius #135290
+411
−182
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.
Currently, with the full setup in #134980 (but is from #134268), the polonius location-sensitive analysis converts
Locations::All
typeck constraints as edges at all points in the CFG. This was temporary.There's a FIXME about that already, and this PR implements it: we now use the constraints that hold at all points during traversal instead of eagerly materializing them as physical edges.
Another easy one @jackh726, but it's stacked on top of #134980, only the last two commits are new and of interest here. Once again opening as draft until that other PR lands.
This fixes the slowness that was happening on the big CFG from the
saturating-float-casts
test (because of its 12M materialized edges) without, AFAICT, simply moving this overhead to traversal: materializing the logical edges is done on-demand.r? @jackh726 (no rush either)