Skip to content

Make erase_regions_ty no_hash and remove support for anon queries #59968

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

Closed
wants to merge 2 commits into from

Conversation

Zoxc
Copy link
Contributor

@Zoxc Zoxc commented Apr 14, 2019

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 14, 2019
@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 14, 2019

@bors try

@bors
Copy link
Collaborator

bors commented Apr 14, 2019

⌛ Trying commit 423e679 with merge 599cd5e...

bors added a commit that referenced this pull request Apr 14, 2019
Make erase_regions_ty no_hash and remove support for anon queries

r? @michaelwoerister
@bors
Copy link
Collaborator

bors commented Apr 14, 2019

☀️ Try build successful - checks-travis
Build commit: 599cd5e

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 15, 2019

@rust-timer build 599cd5e

@rust-timer
Copy link
Collaborator

Success: Queued 599cd5e with parent d70c5a9, comparison URL.

@Dylan-DPC-zz
Copy link

ping from triage @michaelwoerister waiting for your review on this

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 599cd5e

@michaelwoerister
Copy link
Member

Trait selection still needs anonymous dep-nodes. I'd love to get rid of anonymous queries but it might be blocked on Chalk integration (or at least doing something similar). cc @rust-lang/wg-traits

I'd be interested in the results of making erase_regions_ty no_hash but I suspect that it leads to a lot of invalidation downstream.

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 15, 2019

Trait selection still needs anonymous dep-nodes.

Yeah that is why I kept that and explicitly said anonymous queries. Is there any particular reason we hash the dependencies of anon nodes instead of just storing them directly? I may be looking to change that, though I'd prefer no anon nodes.

Would it be possible for trait selection to use a regular dep node by hashing the input or something like that?

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 15, 2019

I'd be interested in the results of making erase_regions_ty no_hash but I suspect that it leads to a lot of invalidation downstream.

Given that erase_regions_ty is supposed to have no dependencies, it will always be marked green, so there's no downside from no_hash.

@michaelwoerister
Copy link
Member

Yeah that is why I kept that and explicitly said anonymous queries.

It would be really helpful if you provided descriptions for your PRs. Some background information, the motivation for doing the change, things of note that are easily overlooked, potentially contentious consequences of the change, etc.

Given that erase_regions_ty is supposed to have no dependencies, it will always be marked green, so there's no downside from no_hash.

Hm, that's a rather subtle side-effect of how try-mark-green works but I guess it's even correct :)

I'm not sure what to make of the performance results. Except for ctfe-stress-2 instruction counts seem to regress slightly.

Is there any particular reason we hash the dependencies of anon nodes instead of just storing them directly?

What do you mean exactly?

Would it be possible for trait selection to use a regular dep node by hashing the input or something like that?

I don't remember the exact reasons, @nikomatsakis took care of trait selection dep-tracking. Something in the way the caching for trait selection works made anon nodes necessary.

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 15, 2019

I forgot to include the fix from the other PR. Let's see if the servo regression goes away with that.

@bors try

bors added a commit that referenced this pull request Apr 15, 2019
Make erase_regions_ty no_hash and remove support for anon queries

r? @michaelwoerister
@bors
Copy link
Collaborator

bors commented Apr 15, 2019

⌛ Trying commit cc7b4c2 with merge 270dea6...

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 15, 2019

Is there any particular reason we hash the dependencies of anon nodes instead of just storing them directly?

I guess we already store the dependencies already. Maybe I was thinking of some scheme were we generate an unique dep node based on the dependencies ([DepNodeIndex]) which could use FxHash and a hash map, but I guess that wouldn't really change much.

@bors
Copy link
Collaborator

bors commented Apr 15, 2019

⌛ Trying commit cc7b4c2 with merge bf680dd88be9b5d89e7a6d8969d053981fa9196b...

@bors
Copy link
Collaborator

bors commented Apr 15, 2019

💔 Test failed - checks-travis

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 15, 2019
@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 15, 2019

@bors try

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 15, 2019

@bors retry

@bors
Copy link
Collaborator

bors commented Apr 15, 2019

⌛ Trying commit cc7b4c2 with merge 7b167f5...

bors added a commit that referenced this pull request Apr 15, 2019
Make erase_regions_ty no_hash and remove support for anon queries

r? @michaelwoerister
@bors
Copy link
Collaborator

bors commented Apr 15, 2019

☀️ Try build successful - checks-travis
Build commit: 7b167f5

@Zoxc
Copy link
Contributor Author

Zoxc commented Apr 17, 2019

@rust-timer build 7b167f5

@rust-timer
Copy link
Collaborator

Success: Queued 7b167f5 with parent 07133ac, comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit 7b167f5

@michaelwoerister
Copy link
Member

Performance numbers look like a slight regression. Since we are in no rush to remove anonymous queries, I suggest we wait for a solution along the lines of #59505.

@Zoxc Zoxc closed this Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants