Skip to content

borrowck: skip CFG construction when there is nothing to propagate #43547

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

Merged
merged 1 commit into from
Aug 1, 2017

Conversation

arielb1
Copy link
Contributor

@arielb1 arielb1 commented Jul 29, 2017

CFG construction takes a large amount of time and memory, especially for
large constants. If such a constant contains no actions on lvalues, it
can't have borrowck problems and can be ignored by it.

This removes the 4.9GB borrowck peak from #36799. It seems that HIR had
grown by 300MB and MIR had grown by 500MB from the last massif
collection and that remains to be investigated, but this at least shaves
the borrowck peak.

r? @nikomatsakis

@@ -220,6 +220,13 @@ impl<'a, 'tcx> MoveData<'tcx> {
}
}

// return true if there us
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this comment be expanded upon? I don't really follow it right now...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@arielb1 arielb1 force-pushed the no-borrow-no-check branch from d9884d6 to a17983e Compare July 31, 2017 12:06
CFG construction takes a large amount of time and memory, especially for
large constants. If such a constant contains no actions on lvalues, it
can't have borrowck problems and can be ignored by it.

This removes the 4.9GB borrowck peak from rust-lang#36799. It seems that HIR had
grown by 300MB and MIR had grown by 500MB from the last massif
collection and that remains to be investigated, but this at least shaves
the borrowck peak.
@arielb1 arielb1 force-pushed the no-borrow-no-check branch from a17983e to 83eb264 Compare July 31, 2017 12:17
@carols10cents carols10cents added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2017
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me mildly nervous, but I can't come up with anything that will go wrong. =)

@nikomatsakis
Copy link
Contributor

@bors r+

@carols10cents
Copy link
Member

@bors r=nikomatsakis

@bors
Copy link
Collaborator

bors commented Jul 31, 2017

📌 Commit 83eb264 has been approved by nikomatsakis

bors added a commit that referenced this pull request Jul 31, 2017
borrowck: skip CFG construction when there is nothing to propagate

CFG construction takes a large amount of time and memory, especially for
large constants. If such a constant contains no actions on lvalues, it
can't have borrowck problems and can be ignored by it.

This removes the 4.9GB borrowck peak from #36799. It seems that HIR had
grown by 300MB and MIR had grown by 500MB from the last massif
collection and that remains to be investigated, but this at least shaves
the borrowck peak.

r? @nikomatsakis
@bors
Copy link
Collaborator

bors commented Jul 31, 2017

⌛ Testing commit 83eb264 with merge ebf74d9...

@bors
Copy link
Collaborator

bors commented Aug 1, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing ebf74d9 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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.

5 participants