Skip to content

Reduce the amount of untracked state in TyCtxt - #85153

Merged
bors merged 12 commits into
rust-lang:masterfrom
cjgillot:qresolve
Jun 1, 2021
Merged

bors merged 12 commits into
rust-lang:masterfrom
cjgillot:qresolve

Conversation

@cjgillot

Copy link
Copy Markdown
Contributor

Access to untracked global state may generate instances of #84970.

The GlobalCtxt contains the lowered HIR, the resolver outputs and interners.
By wrapping the resolver inside a query, we make sure those accesses are properly tracked.
As a no_hash query, all dependent queries essentially become eval_always,
what they should have been from the beginning.

@rust-highfive

ghost commented May 10, 2021

Copy link
Copy Markdown
Contributor

r? @matthewjasper

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 10, 2021
@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_middle/src/ty/context.rs Resolved
Comment thread compiler/rustc_middle/src/ty/context.rs Resolved
@cjgillot

ghost commented May 10, 2021

Copy link
Copy Markdown
Contributor Author

r? @Aaron1011

@petrochenkov petrochenkov self-assigned this May 10, 2021
@Aaron1011

ghost commented May 10, 2021

Copy link
Copy Markdown
Contributor

@bors try @rust-timer queue

@rust-timer

ghost commented May 10, 2021

Copy link
Copy Markdown
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 10, 2021
@bors

ghost commented May 10, 2021

Copy link
Copy Markdown
Contributor

⌛ Trying commit e7f85d5d56e67d76769f003cb66fd2c93aa8d66d with merge 570c16c920c6bcfc3414b8d72b0aac02b812c715...

@bors

ghost commented May 10, 2021

Copy link
Copy Markdown
Contributor

☀️ Try build successful - checks-actions
Build commit: 570c16c920c6bcfc3414b8d72b0aac02b812c715 (570c16c920c6bcfc3414b8d72b0aac02b812c715)

@rust-timer

ghost commented May 10, 2021

Copy link
Copy Markdown
Collaborator

Queued 570c16c920c6bcfc3414b8d72b0aac02b812c715 with parent 266f452, future comparison URL.

@rust-timer

ghost commented May 10, 2021

Copy link
Copy Markdown
Collaborator

Finished benchmarking try commit (570c16c920c6bcfc3414b8d72b0aac02b812c715): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label May 10, 2021
@michaelwoerister

ghost commented May 11, 2021 •

Copy link
Copy Markdown
Member

Because I see it being used here: StableVec looks problematic to me because its HashStable implementation "hides" the order of its items, but that order is visible to users of the vec. I think this type should be removed and replaced with either a hash set (if the order does not matter) or a regular Vec (which must be built in a deterministic way).

@michaelwoerister

ghost commented May 11, 2021

Copy link
Copy Markdown
Member

It looks like the trait map is the only code that uses StableVec, so this PR would be a good opportunity to get rid of it.

@petrochenkov petrochenkov removed their assignment May 11, 2021
@bors

ghost commented May 11, 2021

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #82272) made this pull request unmergeable. Please resolve the merge conflicts.

@bors

ghost commented May 12, 2021

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #83610) made this pull request unmergeable. Please resolve the merge conflicts.

@Aaron1011 Aaron1011 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.