-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Print regions in type_name
.
#145284
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?
Print regions in type_name
.
#145284
Conversation
This comment has been minimized.
This comment has been minimized.
6779af2
to
36f25a0
Compare
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
This comment has been minimized.
This comment has been minimized.
Currently they are skipped, which is a bit weird, and it sometimes causes malformed output like `Foo<>` and `dyn Bar<, A = u32>`. Most regions are erased by the time `type_name` does its work. So all regions are now printed as `'_` in non-optional places. Not perfect, but better than the status quo. `c_name` is updated to trim lifetimes from MIR pass names, so that the `PASS_NAMES` sanity check still works. It is also renamed as `simplify_pass_type_name` and made non-const, because it doesn't need to be const and the non-const implementation is much shorter. The commit also renames `should_print_region` as `should_print_optional_region`, which makes it clearer that it only applies to some regions. Fixes rust-lang#145168.
36f25a0
to
3720e1a
Compare
|
I updated again. @rustbot ready |
i would expect that we've done it in a const block for 👻 perf 👻 reasons? 🤔 @bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Print regions in `type_name`.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (fc05a4f): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient 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 (secondary 4.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 3.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 464.093s -> 466.402s (0.50%) |
☔ The latest upstream changes (presumably #145366) made this pull request unmergeable. Please resolve the merge conflicts. |
Currently they are skipped, which is a bit weird, and it sometimes causes malformed output like
Foo<>
anddyn Bar<, A = u32>
.Most regions are erased by the time
type_name
does its work. So all regions are now printed as'_
in non-optional places. Not perfect, but better than the status quo.c_name
is updated to trim lifetimes from MIR pass names, so that thePASS_NAMES
sanity check still works. It is also renamed assimplify_pass_type_name
and made non-const, because it doesn't need to be const and the non-const implementation is much shorter.The commit also renames
should_print_region
asshould_print_optional_region
, which makes it clearer that it only applies to some regions.Fixes #145168.
r? @lcnr