-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Access less HIR attributes from typeck #144841
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
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Access less HIR attributes from typeck
This comment has been minimized.
This comment has been minimized.
💔 Test failed (CI). Failed jobs:
|
This comment has been minimized.
This comment has been minimized.
d414182
to
bf644e9
Compare
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Access less HIR attributes from typeck
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (038c022): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking 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. @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.5%, secondary 4.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 467.629s -> 467.286s (-0.07%) |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
❌ Encountered an error while executing command |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Access less HIR attributes from typeck
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.
Access less HIR attributes from typeck
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (f6975aa): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking 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. @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.8%, secondary 0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -5.5%)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: 466.337s -> 468.162s (0.39%) |
r? @SparrowLii rustbot has assigned @SparrowLii. Use |
This PR changes a file inside |
@@ -894,7 +896,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { | |||
} | |||
|
|||
// If we have `rustc_do_not_const_check`, do not check `[const]` bounds. | |||
if self.tcx.has_attr(self.body_id, sym::rustc_do_not_const_check) { | |||
if self.has_rustc_attrs && self.tcx.has_attr(self.body_id, sym::rustc_do_not_const_check) { |
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.
I'm not certain that this change is correct. OTOH, do we still need the shortcut when the trait solver and const-checking have this check?
Typeck relies on attributes to modify its own behaviour. This is a problem, as this means that
typeck(some function)
may depend on the span and doc-comments of many other functions.This PR attempts to reduce such accesses to attributes. This yields to a sizeable perf improvement: #144841 (comment)
Fixes #124352