Skip to content

[5.0] Reduce compile time for large strongly connected call graphs. #21805

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
Jan 14, 2019
Merged

[5.0] Reduce compile time for large strongly connected call graphs. #21805

merged 1 commit into from
Jan 14, 2019

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Jan 11, 2019

Improves SwiftSyntax release build speed by 4x.

Limit the size of the sets tracked by inter procedural
AccessedStorageAnalysis. There is a lot of leeway in this limit since
"normal" code doesn't come close to hitting it and SwiftSyntax compile
time isn't noticeably affected until 10x this limit.

This change also avoids reanalyzing function bodies once results have
bottomed out and avoids copying sets in the common case.

Fixes rdar://problem/46905624 Release build time regression, a lot of time spent on AccessEnforcementOpts::run().

This is just a band aid. The fundamental problem is really:
rdar://problem/47195282 Recomputing BottomUpIPAnalysis takes most of
the SwiftSyntax compile time.

SwiftSyntax compile time is still at least an order of magnitude
longer than it should be.

(cherry picked from commit 5b42469)

Improves SwiftSyntax release build speed by 4x.

Limit the size of the sets tracked by inter procedural
AccessedStorageAnalysis. There is a lot of leeway in this limit since
"normal" code doesn't come close to hitting it and SwiftSyntax compile
time isn't noticeably affected until 10x this limit.

This change also avoids reanalyzing function bodies once results have
bottomed out and avoids copying sets in the common case.

Fixes <rdar://problem/46905624> Release build time regression, a lot of time spent on AccessEnforcementOpts::run().

This is just a band aid. The fundamental problem is really:
<rdar://problem/47195282> Recomputing BottomUpIPAnalysis takes most of
the SwiftSyntax compile time.

SwiftSyntax compile time is still at least an order of magnitude
longer than it should be.

(cherry picked from commit 5b42469)
@atrick atrick requested a review from a team as a code owner January 11, 2019 23:02
@atrick
Copy link
Contributor Author

atrick commented Jan 11, 2019

@swift-ci test.

@atrick
Copy link
Contributor Author

atrick commented Jan 11, 2019

@swift-ci test source compatibility.

@atrick atrick changed the title Reduce compile time for large strongly connected call graphs. [5.0] Reduce compile time for large strongly connected call graphs. Jan 11, 2019
@atrick atrick requested a review from eeckstein January 11, 2019 23:04
@atrick
Copy link
Contributor Author

atrick commented Jan 14, 2019

@eeckstein this is ready to merge.

@eeckstein eeckstein merged commit 5eb65b8 into swiftlang:swift-5.0-branch Jan 14, 2019
@atrick atrick deleted the 5.0-fix-merge-access branch February 22, 2019 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants