Skip to content

avoid computing liveness when possible #53168

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Conversation

nikomatsakis
Copy link
Contributor

Second stab at #52713. This version avoids computing liveness for variables whose types contain only regions that are known to extend free regions (for any reason, maybe not just because they are returned).

Fixes #52713

r? @pnkfelix
cc @lqd

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 7, 2018
In particular, we skip computing liveness for a variable X if all the
regions in its type are known to outlive free regions.
@nikomatsakis
Copy link
Contributor Author

@bors try

Local experiments suggest this will be a big perf win, just as before. The diagnostics do degrade, I think, slightly. I think we could probably fix that.

@bors
Copy link
Collaborator

bors commented Aug 7, 2018

⌛ Trying commit 3b7989d with merge aea424935d9666ab3a7efc69c7e88452e460479c...

@nikomatsakis nikomatsakis added S-waiting-on-perf Status: Waiting on a perf run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 7, 2018
@bors
Copy link
Collaborator

bors commented Aug 7, 2018

☀️ Test successful - status-travis
State: approved= try=True

@nikomatsakis
Copy link
Contributor Author

@rust-timer build aea424935d9666ab3a7efc69c7e88452e460479c

@rust-timer
Copy link
Collaborator

Success: Queued aea424935d9666ab3a7efc69c7e88452e460479c with parent ccb550f, comparison URL.

@kennytm kennytm added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Aug 8, 2018
@kennytm
Copy link
Member

kennytm commented Aug 8, 2018

Perf is ready. The numbers look pretty good.

@nikomatsakis
Copy link
Contributor Author

I think I will close this in favor of #53177, which builds on it but does more.

bors added a commit that referenced this pull request Aug 10, 2018
…g-values, r=pnkfelix

optimize redundant borrows and escaping paths in NLL

This builds on #53168 and adds a commit that addresses #53176 -- or at least I think it does. I marked this as WIP because I want to see the test results (and measure the performance). I also want to double check we're not adding in any unsoundness here.
bors added a commit that referenced this pull request Aug 10, 2018
…g-values, r=pnkfelix

optimize redundant borrows and escaping paths in NLL

This builds on #53168 and adds a commit that addresses #53176 -- or at least I think it does. I marked this as WIP because I want to see the test results (and measure the performance). I also want to double check we're not adding in any unsoundness here.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants