-
Notifications
You must be signed in to change notification settings - Fork 13.4k
remove visit_clobber
and move DummyAstNode
to rustc_expand
#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
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.
|
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.
@bors r=petrochenkov |
Rollup of 8 pull requests Successful merges: - #141312 (Add From<TryLockError> for io::Error) - #141495 (Rename `{GenericArg,Term}::unpack()` to `kind()`) - #141602 (triagebot: label LLVM submodule changes with `A-LLVM`) - #141632 (remove `visit_mt` from `ast::mut_visit`) - #141640 (test: convert version_check ui test to run-make) - #141645 (bump fluent-* crates) - #141650 (coverage: Revert "unused local file IDs" due to empty function names) - #141654 (tests: mark option-niche-eq as fixed on LLVM 21) Failed merges: - #141430 (remove `visit_clobber` and move `DummyAstNode` to `rustc_expand`) - #141636 (avoid some usages of `&mut P<T>` in AST visitors) r? `@ghost` `@rustbot` modify labels: rollup
☔ The latest upstream changes (presumably #141644) made this pull request unmergeable. Please resolve the merge conflicts. |
Rollup of 8 pull requests Successful merges: - rust-lang/rust#141312 (Add From<TryLockError> for io::Error) - rust-lang/rust#141495 (Rename `{GenericArg,Term}::unpack()` to `kind()`) - rust-lang/rust#141602 (triagebot: label LLVM submodule changes with `A-LLVM`) - rust-lang/rust#141632 (remove `visit_mt` from `ast::mut_visit`) - rust-lang/rust#141640 (test: convert version_check ui test to run-make) - rust-lang/rust#141645 (bump fluent-* crates) - rust-lang/rust#141650 (coverage: Revert "unused local file IDs" due to empty function names) - rust-lang/rust#141654 (tests: mark option-niche-eq as fixed on LLVM 21) Failed merges: - rust-lang/rust#141430 (remove `visit_clobber` and move `DummyAstNode` to `rustc_expand`) - rust-lang/rust#141636 (avoid some usages of `&mut P<T>` in AST visitors) r? `@ghost` `@rustbot` modify labels: rollup
`visit_clobber` is not really useful except for one niche purpose involving generic code. We should just use the replace logic where we can.
09d4189
to
5e71855
Compare
@bors r=petrochenkov |
Rollup of 4 pull requests Successful merges: - #138285 (Stabilize `repr128`) - #139994 (add `CStr::display`) - #141571 (coretests: extend and simplify float tests) - #141656 (CI: Add cargo tests to aarch64-apple-darwin) Failed merges: - #141430 (remove `visit_clobber` and move `DummyAstNode` to `rustc_expand`) - #141636 (avoid some usages of `&mut P<T>` in AST visitors) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #133823 (Use `cfg_attr_trace` in AST with a placeholder attribute for accurate suggestion) - #141004 (Report text_direction_codepoint_in_literal when parsing) - #141407 (Refactor the two-phase check for impls and impl items) - #141430 (remove `visit_clobber` and move `DummyAstNode` to `rustc_expand`) - #141507 (atomic_load intrinsic: use const generic parameter for ordering) - #141538 (implement `va_arg` for x86_64 systemv) - #141669 (float: Replace some approximate assertions with exact) - #141747 (rustdoc: display doc(cfg(false)) properly) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #141430 - fee1-dead-contrib:push-nmzoprvtsvww, r=petrochenkov remove `visit_clobber` and move `DummyAstNode` to `rustc_expand` `visit_clobber` is not really useful except for one niche purpose involving generic code. We should just use the replace logic where we can.
Rollup of 4 pull requests Successful merges: - rust-lang#138285 (Stabilize `repr128`) - rust-lang#139994 (add `CStr::display`) - rust-lang#141571 (coretests: extend and simplify float tests) - rust-lang#141656 (CI: Add cargo tests to aarch64-apple-darwin) Failed merges: - rust-lang#141430 (remove `visit_clobber` and move `DummyAstNode` to `rustc_expand`) - rust-lang#141636 (avoid some usages of `&mut P<T>` in AST visitors) r? `@ghost` `@rustbot` modify labels: rollup
@rust-timer build 7c866b4 (Trying perf. due to #141753) |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (7c866b4): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking 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. @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 (secondary 0.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.
CyclesResults (secondary 0.2%)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: missing data |
Rollup of 8 pull requests Successful merges: - rust-lang/rust#133823 (Use `cfg_attr_trace` in AST with a placeholder attribute for accurate suggestion) - rust-lang/rust#141004 (Report text_direction_codepoint_in_literal when parsing) - rust-lang/rust#141407 (Refactor the two-phase check for impls and impl items) - rust-lang/rust#141430 (remove `visit_clobber` and move `DummyAstNode` to `rustc_expand`) - rust-lang/rust#141507 (atomic_load intrinsic: use const generic parameter for ordering) - rust-lang/rust#141538 (implement `va_arg` for x86_64 systemv) - rust-lang/rust#141669 (float: Replace some approximate assertions with exact) - rust-lang/rust#141747 (rustdoc: display doc(cfg(false)) properly) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 4 pull requests Successful merges: - rust-lang/rust#138285 (Stabilize `repr128`) - rust-lang/rust#139994 (add `CStr::display`) - rust-lang/rust#141571 (coretests: extend and simplify float tests) - rust-lang/rust#141656 (CI: Add cargo tests to aarch64-apple-darwin) Failed merges: - rust-lang/rust#141430 (remove `visit_clobber` and move `DummyAstNode` to `rustc_expand`) - rust-lang/rust#141636 (avoid some usages of `&mut P<T>` in AST visitors) r? `@ghost` `@rustbot` modify labels: rollup
visit_clobber
is not really useful except for one niche purposeinvolving generic code. We should just use the replace logic where we
can.