-
Notifications
You must be signed in to change notification settings - Fork 13.4k
remove visit_clobber
and DummyAstNode
#141430
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
base: master
Are you sure you want to change the base?
Conversation
FYI: Something similar was tried in an early version of PR #121829. Discussion: #121829 (comment), not sure if still relevant / relevant in general. I only skimmed your & the other PR. |
This comment has been minimized.
This comment has been minimized.
219f808
to
b84f556
Compare
seems irrelevant to me. There has been a year since the previous comment saying there could be additional uses of If we want to get a dummy of something why should we use a trait? just put it e.g. as an inherent method on |
This comment has been minimized.
This comment has been minimized.
b84f556
to
c7ee736
Compare
This comment has been minimized.
This comment has been minimized.
c7ee736
to
dbaf7ae
Compare
This comment has been minimized.
This comment has been minimized.
dbaf7ae
to
477d572
Compare
🤦 Sorry for the spam. I really should stop being lazy and do more local testing before pushing. |
Nah, stage2 tests are always a pain ^^' |
I don't think this is an improvement, invocation collector works with nodes generically, abstracting a number of small operations for every node, including clobbering.
|
} | ||
}); | ||
if let Some(expr) = opt_expr.take() { | ||
*opt_expr = vis.filter_map_expr(expr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is good, it's simpler and visit_clobber
is not used generically here.
tokens: None, | ||
}) | ||
}); | ||
let expr = std::mem::replace(e, Expr::dummy()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also looks better without visit_clobber
.
r? @petrochenkov |
Requested reviewer is already assigned to this pull request. Please choose another assignee. |
As I said previously, I don't think having that generic behavior is necessary.
The bridge from |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
remove `visit_clobber` and `DummyAstNode` used for one specific niche purpose, turns out we can just remove them and inline dummy values into callsites. this cleans them up.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (ec406cc): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.6%, secondary -4.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 2.0%, secondary 2.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.992s -> 778.523s (0.20%) |
Yeah, that's why the clobbering should be inside |
ah, alright. I'll bring it back to |
used for one specific niche purpose. move `DummyAstNode` to `rustc_expand` as that is where it is used.
477d572
to
fd6eaac
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
remove `visit_clobber` and `DummyAstNode` used for one specific niche purpose, turns out we can just remove them and inline dummy values into callsites. this cleans them up.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (25ef124): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 1.8%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 2.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 777.008s -> 777.565s (0.07%) |
Not sure why this would be a regression, would you mind reviewing and let me know what you think? @petrochenkov @rustbot ready |
used for one specific niche purpose, turns out we can just remove them and inline dummy values into callsites. this cleans them up.