-
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
[Don't merge] Perf test for using closure precise capture #79696
Conversation
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 009113acaec7512b6913d43abcdfa0d9cbdca8ce with merge 6fe642cd1853de8dbc94a494cc72f3f9c0d32899... |
💔 Test failed - checks-actions |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit e77ca454427a1c3a54ec47def6f44c339e8ff554 with merge 06e8ed264fa6db879bda64c2bc3b2215911a1b7c... |
💔 Test failed - checks-actions |
☔ The latest upstream changes (presumably #79724) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
- Derive TypeFoldable on `hir::place::Place` and associated structs, to them to be written into typeck results. Co-authored-by: Jennifer Wills <wills.jenniferg@gmail.com> Co-authored-by: Logan Mosier <logmosier@gmail.com>
- final_upvar_tys now reads types from places instead of using `node_ty` Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
- This allows us to delay figuring out the index of a capture in the closure structure when all projections to atleast form a capture have been applied to the builder Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
- Use closure_min_capture maps to capture precise paths - PlaceBuilder now searches for ancestors in min_capture list - Add API to `Ty` to allow access to the n-th element in a tuple in O(1) time. Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
- Closures now use closure_min_captures to figure out captured paths - Build upvar_mutbls using closure_min_captures - Change logic in limit_capture_mutability to differentiate b/w capturing parent's local variable or capturing a variable that is captured by the parent (in case of nested closure) using PlaceBase. Co-authored-by: Roxane Fruytier <roxane.fruytier@hotmail.com>
- Use closure_min_captures to generate the Upvar structure that stores information for diagnostics and information about mutability of captures.
- Store this in `ty::CapturedPlace` - Use `ty::CapturedPlace::mutability` to in mir_build and borrow_check
- No Derefs in move closure, this will result in value behind a reference getting moved. - No projections are applied to raw pointers, since these require unsafe blocks. We capture them completely. - No Index projections are captured, since arrays are captured completely.
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 20692cb with merge d5c47437deb5a77afed53e0bba2a050fbeaf974c... |
☀️ Try build successful - checks-actions |
Queued d5c47437deb5a77afed53e0bba2a050fbeaf974c with parent 15eaa00, future comparison URL. |
Finished benchmarking try commit (d5c47437deb5a77afed53e0bba2a050fbeaf974c): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
^ This was feature enabled + mutability fix + move closures drop deref captures |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit 015c6a2 with merge aee064ad665521e03371fbb810437a813fbdd365... |
☀️ Try build successful - checks-actions |
Queued aee064ad665521e03371fbb810437a813fbdd365 with parent 0f6f2d6, future comparison URL. |
Finished benchmarking try commit (aee064ad665521e03371fbb810437a813fbdd365): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
right before this commit was feature enabled + mutability fix + all moves drop derefs |
@bors try @rust-timer queue |
Awaiting bors try build completion |
⌛ Trying commit acd732a with merge 80f976ebf93cfeeb1f52bbd43eedb03b4568b8bc... |
☀️ Try build successful - checks-actions |
Queued 80f976ebf93cfeeb1f52bbd43eedb03b4568b8bc with parent 0f6f2d6, future comparison URL. |
Finished benchmarking try commit (80f976ebf93cfeeb1f52bbd43eedb03b4568b8bc): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
I'm done experimenting :) |
Enables
capture_disjoint_fields
by default. This PR includes a couple of hacks to get around know bugs when the feature is enabled. Most failing tests required UI changes or are known issues and it didn't make sense to update all of them just for the perf run.r? @ghost