resolve: Evaluate private visibilities eagerly in eff vis computation#156185
resolve: Evaluate private visibilities eagerly in eff vis computation#156185petrochenkov wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
r? @folkertdev rustbot has assigned @folkertdev. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
resolve: Try removing questionable optimizations in eff vis computation
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (b88d160): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.7%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 3.5%, secondary 1.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 495.518s -> 495.363s (-0.03%) |
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
resolve: Try removing questionable optimizations in eff vis computation
This comment has been minimized.
This comment has been minimized.
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (71f45f1): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.0%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -7.8%, secondary -7.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary 0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 499.128s -> 500.469s (0.27%) |
Now tt-muncher cycles are very green instead, seems like it's just unreliable. |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
resolve: Evaluate private visibilities eagerly in eff vis computation
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
|
@rustbot reroll |
|
cc @mu001999 |
resolve: Set correct parent and expansion for `self` declarations Follow up to rust-lang#146972 and rust-lang#154313. The `parent` seems to not be used yet, it will ICE if used (rust-lang#156185 uses it). The `expn_id` is only relevant to macros 2.0, I won't bother coming up with a test.
resolve: Set correct parent and expansion for `self` declarations Follow up to rust-lang#146972 and rust-lang#154313. The `parent` seems to not be used yet, it will ICE if used (rust-lang#156185 uses it). The `expn_id` is only relevant to macros 2.0, I won't bother coming up with a test.
| // Set the given effective visibility level to `Level::Direct` and | ||
| // sets the rest of the `use` chain to `Level::Reexported` until | ||
| // we hit the actual exported item. | ||
| let orig_private_vis = self.current_private_vis; |
There was a problem hiding this comment.
Could we pass self.current_private_vis as an explicit parameter like private_vis: Visibility in the parts other than visit_item? That way, we wouldn’t need to save and restore self.current_private_vis.
There was a problem hiding this comment.
We have to keep current_private_vis in the visitor at least in some cases because in AST visitor when visiting e.g. a struct we don't know it's parent module.
a1d65ae shows how it looks if private visibility is always passed when possible.
main...petrochenkov:rust:queffvis2 shows how it looks if private visibility is only passed to update_(import,def).
It may actually be slightly nicer than the PR version.
This comment has been minimized.
This comment has been minimized.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
It's cheaper to evaluate them now when
Declarations keep their parent modules.View all comments