-
Notifications
You must be signed in to change notification settings - Fork 13k
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
De-querify trivial_dropck_outlives
.
#66012
De-querify trivial_dropck_outlives
.
#66012
Conversation
It's sufficiently simple and fast that memoizing it is a slight pessimization.
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 8971972 with merge 06e3c5c6c65f3bcce1f70f0b161172fe840ef740... |
I'm not certain this is worthwhile, but I've been looking at the parallel compiler running with one thread and The self-profile stats on perf.rust-lang.org show that |
☀️ Try build successful - checks-azure |
Queued 06e3c5c6c65f3bcce1f70f0b161172fe840ef740 with parent aa4e57c, future comparison URL. |
Thanks, @nnethercote! r=me if it doesn't regress performance. |
Finished benchmarking try commit 06e3c5c6c65f3bcce1f70f0b161172fe840ef740, comparison URL. |
It's a small instruction counts win, up to 1%. @bors r=michaelwoerister |
📌 Commit 8971972 has been approved by |
…outlives, r=michaelwoerister De-querify `trivial_dropck_outlives`. It's sufficiently simple and fast that memoizing it is a slight pessimization. r? @michaelwoerister
…outlives, r=michaelwoerister De-querify `trivial_dropck_outlives`. It's sufficiently simple and fast that memoizing it is a slight pessimization. r? @michaelwoerister
@@ -208,15 +207,15 @@ pub fn trivial_dropck_outlives<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool { | |||
| ty::Error => true, | |||
|
|||
// [T; N] and [T] have same properties as T. | |||
ty::Array(ty, _) | ty::Slice(ty) => tcx.trivial_dropck_outlives(ty), | |||
ty::Array(ty, _) | ty::Slice(ty) => trivial_dropck_outlives(tcx, ty), |
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.
Maybe add some comment on why this can't result in infinite recursion? Since the query system isn't around to prevent that. This function could perhaps be a method on TyCtxt
to avoid changing use sites.
…outlives, r=michaelwoerister De-querify `trivial_dropck_outlives`. It's sufficiently simple and fast that memoizing it is a slight pessimization. r? @michaelwoerister
Rollup of 8 pull requests Successful merges: - #65948 (Improve MaybeUninit::get_{ref,mut} documentation) - #65953 (Allow specifying LLVM's MCTargetOptions::ABIName in target specification files) - #66012 (De-querify `trivial_dropck_outlives`.) - #66025 (`Span` cannot represent `span.hi < span.lo`) - #66047 (Don't double-count `simd_shuffle` promotion candidates) - #66053 (when Miri tests are not passing, do not add Miri component) - #66082 (clean highlightSourceLines code) - #66091 (Implemented the home_dir for VxWorks) Failed merges: r? @ghost
It's sufficiently simple and fast that memoizing it is a slight
pessimization.
r? @michaelwoerister