-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
Conversation
@@ -220,6 +220,13 @@ impl<'a, 'tcx> MoveData<'tcx> { | |||
} | |||
} | |||
|
|||
// return true if there us |
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.
Could this comment be expanded upon? I don't really follow it right now...
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.
Fixed
d9884d6
to
a17983e
Compare
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.
a17983e
to
83eb264
Compare
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.
This makes me mildly nervous, but I can't come up with anything that will go wrong. =)
@bors r+ |
@bors r=nikomatsakis |
📌 Commit 83eb264 has been approved by |
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
☀️ Test successful - status-appveyor, status-travis |
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