Skip to content
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

Store all HIR owners in the same container #83723

Merged
merged 6 commits into from
Jul 25, 2021
Merged

Conversation

cjgillot
Copy link
Contributor

This replaces the previous storage in a BTreeMap for each of Item/ImplItem/TraitItem/ForeignItem.
This should allow for a more compact storage.

Based on #83114

@rust-highfive
Copy link
Collaborator

Some changes occurred in src/tools/clippy.

cc @rust-lang/clippy

@rust-highfive
Copy link
Collaborator

r? @varkor

(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 Mar 31, 2021
@bors

This comment has been minimized.

@cjgillot
Copy link
Contributor Author

cjgillot commented Apr 3, 2021

@bors try @rust-timer queue

@rust-timer
Copy link
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 Apr 3, 2021
@bors
Copy link
Contributor

bors commented Apr 3, 2021

⌛ Trying commit ab5f8b23e95aef3bd44647be271035eeb1d269e1 with merge b50e97d3d3443c82ec42958fccf41b9ebd0ca079...

@bors
Copy link
Contributor

bors commented Apr 3, 2021

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

@rust-timer
Copy link
Collaborator

Queued b50e97d3d3443c82ec42958fccf41b9ebd0ca079 with parent 97717a5, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (b50e97d3d3443c82ec42958fccf41b9ebd0ca079): 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 Apr 4, 2021
@varkor
Copy link
Member

varkor commented Apr 7, 2021

Seems like there are still large regressions for the CTFE tests.

@varkor varkor 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 Apr 11, 2021
@bors

This comment has been minimized.

@cjgillot cjgillot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 23, 2021
@cjgillot
Copy link
Contributor Author

@bors try @rust-timer queue

@rust-timer
Copy link
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 Apr 23, 2021
@bors
Copy link
Contributor

bors commented Apr 23, 2021

⌛ Trying commit 3aaafaca8c72acb3ed8c4a04ecedb2d9b641cbc6 with merge c9f9b58a33f9e2eb6541b39eca9272685591930a...

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 24, 2021
@petrochenkov
Copy link
Contributor

r=me with review commits squashed into main commits.

@petrochenkov petrochenkov 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 Jul 24, 2021
@cjgillot
Copy link
Contributor Author

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Jul 25, 2021

📌 Commit f798510 has been approved by petrochenkov

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 25, 2021
@bors
Copy link
Contributor

bors commented Jul 25, 2021

⌛ Testing commit f798510 with merge 6489ee1...

@bors
Copy link
Contributor

bors commented Jul 25, 2021

☀️ Test successful - checks-actions
Approved by: petrochenkov
Pushing 6489ee1 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 25, 2021
@bors bors merged commit 6489ee1 into rust-lang:master Jul 25, 2021
@rustbot rustbot added this to the 1.56.0 milestone Jul 25, 2021
@cjgillot cjgillot deleted the ownernode branch July 25, 2021 17:02
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 29, 2021
Store all HIR owners in the same container

This replaces the previous storage in a BTreeMap for each of Item/ImplItem/TraitItem/ForeignItem.
This should allow for a more compact storage.

Based on rust-lang#83114
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 21, 2021
Lower only one HIR owner at a time

Based on rust-lang#83723
Additional diff is here: cjgillot/rust@ownernode...lower-mono

Lowering is very tangled and has a tendency to intertwine the transformation of different items. This PR aims at simplifying the logic by:
- moving global analyses to the resolver (item_generics_num_lifetimes, proc_macros, trait_impls);
- removing a few special cases (non-exported macros and use statements);
- restricting the amount of available information at any one time;
- avoiding back-and-forth between different owners: an item must now be lowered all at once, and its parent cannot refer to its nodes.

I also removed the sorting of bodies by span.  The diagnostic ordering changes marginally, since definitions are pretty much sorted already according to the AST. This uncovered a subtlety in thir-unsafeck.

(While these items could logically be in different PRs, the dependency between commits and the amount of conflicts force a monolithic PR.)
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.