-
Notifications
You must be signed in to change notification settings - Fork 13.6k
search graph: lazily update parent goals #144955
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
Open
lcnr
wants to merge
1
commit into
rust-lang:master
Choose a base branch
from
lcnr:lazily-update-non-parent-goals
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+95
−68
Conversation
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
|
eaf0086
to
f4f80a7
Compare
lcnr
commented
Aug 5, 2025
92fe150
to
48f67bb
Compare
d34a2c3
to
a6f50d5
Compare
r=me after other PR lands and CI passes |
r? BoxyUwU |
☔ The latest upstream changes (presumably #143054) made this pull request unmergeable. Please resolve the merge conflicts. |
a6f50d5
to
db1a64c
Compare
@bors r=BoxyUwU rollup |
Kobzol
added a commit
to Kobzol/rust
that referenced
this pull request
Aug 12, 2025
…s, r=BoxyUwU search graph: lazily update parent goals Based on top of rust-lang#143054. In the search graph only the last entry is actually mutable and all other entries get lazily mutated when popping child goals. This simplifies a bunch of possible future optimizations: - We can try evaluating nested goals and entirely ignore discard their evaluation by simply not calling `fn update_parent_goal` - Because we only lazily update, tracking the "impact" of a nested goal is easy. The necessary information *has to be* integrated in the `StackEntry` of the current goal, as there is otherwise no way to influence its parents. This makes it easier to avoid rerunning cycle heads if they have only been used in candidates which don't impact the final result of a goal. r? `@compiler-errors` `@BoxyUwU`
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 12, 2025
…s, r=BoxyUwU search graph: lazily update parent goals Based on top of rust-lang#143054. In the search graph only the last entry is actually mutable and all other entries get lazily mutated when popping child goals. This simplifies a bunch of possible future optimizations: - We can try evaluating nested goals and entirely ignore discard their evaluation by simply not calling `fn update_parent_goal` - Because we only lazily update, tracking the "impact" of a nested goal is easy. The necessary information *has to be* integrated in the `StackEntry` of the current goal, as there is otherwise no way to influence its parents. This makes it easier to avoid rerunning cycle heads if they have only been used in candidates which don't impact the final result of a goal. r? ``@compiler-errors`` ``@BoxyUwU``
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 12, 2025
…s, r=BoxyUwU search graph: lazily update parent goals Based on top of rust-lang#143054. In the search graph only the last entry is actually mutable and all other entries get lazily mutated when popping child goals. This simplifies a bunch of possible future optimizations: - We can try evaluating nested goals and entirely ignore discard their evaluation by simply not calling `fn update_parent_goal` - Because we only lazily update, tracking the "impact" of a nested goal is easy. The necessary information *has to be* integrated in the `StackEntry` of the current goal, as there is otherwise no way to influence its parents. This makes it easier to avoid rerunning cycle heads if they have only been used in candidates which don't impact the final result of a goal. r? ```@compiler-errors``` ```@BoxyUwU```
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Aug 12, 2025
…s, r=BoxyUwU search graph: lazily update parent goals Based on top of rust-lang#143054. In the search graph only the last entry is actually mutable and all other entries get lazily mutated when popping child goals. This simplifies a bunch of possible future optimizations: - We can try evaluating nested goals and entirely ignore discard their evaluation by simply not calling `fn update_parent_goal` - Because we only lazily update, tracking the "impact" of a nested goal is easy. The necessary information *has to be* integrated in the `StackEntry` of the current goal, as there is otherwise no way to influence its parents. This makes it easier to avoid rerunning cycle heads if they have only been used in candidates which don't impact the final result of a goal. r? ````@compiler-errors```` ````@BoxyUwU````
bors
added a commit
that referenced
this pull request
Aug 12, 2025
Rollup of 7 pull requests Successful merges: - #144642 (editorconfig: don't trim trailing whitespace in tests) - #144955 (search graph: lazily update parent goals) - #145153 (Handle macros with multiple kinds, and improve errors) - #145250 (Add regression test for former ICE involving malformed meta items containing interpolated tokens) - #145269 (Deprecate RUST_TEST_* env variables) - #145289 (chore(ci): upgrade checkout to v5) - #145303 (Docs: Link to payload_as_str() from payload().) r? `@ghost` `@rustbot` modify labels: rollup
bors
added a commit
that referenced
this pull request
Aug 13, 2025
Rollup of 7 pull requests Successful merges: - #144642 (editorconfig: don't trim trailing whitespace in tests) - #144955 (search graph: lazily update parent goals) - #145153 (Handle macros with multiple kinds, and improve errors) - #145250 (Add regression test for former ICE involving malformed meta items containing interpolated tokens) - #145269 (Deprecate RUST_TEST_* env variables) - #145289 (chore(ci): upgrade checkout to v5) - #145303 (Docs: Link to payload_as_str() from payload().) r? `@ghost` `@rustbot` modify labels: rollup
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Aug 13, 2025
…s, r=BoxyUwU search graph: lazily update parent goals Based on top of rust-lang#143054. In the search graph only the last entry is actually mutable and all other entries get lazily mutated when popping child goals. This simplifies a bunch of possible future optimizations: - We can try evaluating nested goals and entirely ignore discard their evaluation by simply not calling `fn update_parent_goal` - Because we only lazily update, tracking the "impact" of a nested goal is easy. The necessary information *has to be* integrated in the `StackEntry` of the current goal, as there is otherwise no way to influence its parents. This makes it easier to avoid rerunning cycle heads if they have only been used in candidates which don't impact the final result of a goal. r? `````@compiler-errors````` `````@BoxyUwU`````
jdonszelmann
added a commit
to jdonszelmann/rust
that referenced
this pull request
Aug 13, 2025
…s, r=BoxyUwU search graph: lazily update parent goals Based on top of rust-lang#143054. In the search graph only the last entry is actually mutable and all other entries get lazily mutated when popping child goals. This simplifies a bunch of possible future optimizations: - We can try evaluating nested goals and entirely ignore discard their evaluation by simply not calling `fn update_parent_goal` - Because we only lazily update, tracking the "impact" of a nested goal is easy. The necessary information *has to be* integrated in the `StackEntry` of the current goal, as there is otherwise no way to influence its parents. This makes it easier to avoid rerunning cycle heads if they have only been used in candidates which don't impact the final result of a goal. r? ``````@compiler-errors`````` ``````@BoxyUwU``````
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
WG-trait-system-refactor
The Rustc Trait System Refactor Initiative (-Znext-solver)
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.
Based on top of #143054. In the search graph only the last entry is actually mutable and all other entries get lazily mutated when popping child goals.
This simplifies a bunch of possible future optimizations:
fn update_parent_goal
StackEntry
of the current goal, as there is otherwise no way to influence its parents. This makes it easier to avoid rerunning cycle heads if they have only been used in candidates which don't impact the final result of a goal.r? @compiler-errors @BoxyUwU