Avoid loading HIR for check_well_formed on type declarations#143328
Avoid loading HIR for check_well_formed on type declarations#143328oli-obk wants to merge 4 commits intorust-lang:mainfrom
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Avoid loading HIR for check_well_formed on type declarations r? `@compiler-errors` the last commit is quite hacky. I could add a `ty_span` query to work together with `def_span` and `def_ident_span`, which would nicely solve all those cases, but potentially add lots of new dep graph edges
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (51abd09): 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 (primary 2.4%, secondary 1.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 0.7%, secondary 2.1%)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: 462.452s -> 462.663s (0.05%) |
|
@bors try @rust-timer queue let's see what the new cache hit perf table column says about this PR |
This comment has been minimized.
This comment has been minimized.
Avoid loading HIR for check_well_formed on type declarations r? `@compiler-errors` the last commit is quite hacky. I could add a `ty_span` query to work together with `def_span` and `def_ident_span`, which would nicely solve all those cases, but potentially add lots of new dep graph edges
|
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (2fb9abc): 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 (primary -0.0%, secondary -2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.8%, secondary 2.6%)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: 465.667s -> 463.45s (-0.48%) |
|
Only instructions regressed, wall time and cycles either improved or are noise (completely unrelated queries). Curious that it did not reduce HIR accesses, so I'll need to investigate a bit more |
|
Perf improvements look not beneficial here. Thoughts? @rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
| tcx.ensure_ok().generics_of(def_id); | ||
| tcx.ensure_ok().type_of(def_id); | ||
| tcx.ensure_ok().predicates_of(def_id); | ||
| } |
There was a problem hiding this comment.
Should we inline this? Or rename and use it more generally?
| @@ -1025,18 +1021,13 @@ fn check_type_defn<'tcx>( | |||
| } | |||
There was a problem hiding this comment.
Should we check def_kind is DefKind::AnonConst | DefKind::InlineConst before fetching HIR here?
r? @compiler-errors