Skip to content

Use AttrVec for Arm, FieldDef, and Variant #86385

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

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

JohnTitor
Copy link
Member

@JohnTitor JohnTitor commented Jun 16, 2021

Uses AttrVec for Arm, FieldDef, and Variant, i.e., where the size of the vector can be empty often.
Skips Crate and Item because I think they may have the attributes on common cases and need more work outside of rustc_ast (e.g. rustc_expand needs a lot of tweaks). But if it's reasonable to change, I'm happy to do so.

Fixes #77662

@rust-highfive
Copy link
Contributor

Some changes occurred in src/tools/rustfmt.

cc @calebcartwright

@rust-highfive
Copy link
Contributor

r? @davidtwco

(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 Jun 16, 2021
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rustfmt changes are good so providing approval accordingly

fwiw, the other changes lgtm to me as well and agree with thinking that attrs would be more common on Item and Crate

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, seems fairly likely to be an perf improvement, but I'll do a perf run anyway to double check. r=me when perf results are good.

@davidtwco
Copy link
Member

@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 Jun 17, 2021
@bors
Copy link
Collaborator

bors commented Jun 17, 2021

⌛ Trying commit 4f8e0eb with merge a6b8035f4e90621eeba98861987b82318abcb25c...

@bors
Copy link
Collaborator

bors commented Jun 17, 2021

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

@rust-timer
Copy link
Collaborator

Queued a6b8035f4e90621eeba98861987b82318abcb25c with parent 0ef2b4a, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (a6b8035f4e90621eeba98861987b82318abcb25c): 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 Jun 17, 2021
@JohnTitor
Copy link
Member Author

Small wins up to ~0.5%, there're 0.2% regressions but they can be noises or acceptable, I'm going to land.

@bors r=davidtwco

@bors
Copy link
Collaborator

bors commented Jun 18, 2021

📌 Commit 4f8e0eb has been approved by davidtwco

@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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 18, 2021
@bors
Copy link
Collaborator

bors commented Jun 18, 2021

⌛ Testing commit 4f8e0eb with merge 1a46283...

@bors
Copy link
Collaborator

bors commented Jun 18, 2021

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing 1a46283 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 18, 2021
@bors bors merged commit 1a46283 into rust-lang:master Jun 18, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 18, 2021
@JohnTitor JohnTitor deleted the use-attrvec branch June 18, 2021 04:34
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.

Should all the AST node types with attributes be using AttrVec?
8 participants