Skip to content

[SILOptimizer] Stop optimization after serialization if only emitting a module #20986

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
Dec 6, 2018

Conversation

harlanhaskins
Copy link
Contributor

@harlanhaskins harlanhaskins commented Dec 4, 2018

This is an experiment to stop the compilation pipeline after we've serialized a SIL module. There are a bunch of optimizations that happen after serialization whose results are tossed completely.

There are some modest wins here for compiling the stdlib with -emit-module -O (measured on an iMac Pro)

Config Time
Swift Standard Library 53.411s
Swift Standard Library (from interface) 42.264s
Swift Standard Library (Stopping Optimizations Early) 41.129s
Swift Standard Library (Stopping Optimizations Early) (from interface) 36.66s

@harlanhaskins
Copy link
Contributor Author

This should not change the benchmarks at all.

@swift-ci please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Dec 4, 2018

Build comment file:

No performance and code size changes


@harlanhaskins harlanhaskins changed the title [DNM] [SILOptimizer] Add flag to stop optimization after serialization [SILOptimizer] Add flag to stop optimization after serialization Dec 4, 2018
Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

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

Needs a test case! (You can get the compiler to print what passes it's running.)

@harlanhaskins
Copy link
Contributor Author

@swift-ci please smoke test

@harlanhaskins
Copy link
Contributor Author

@swift-ci please benchmark

@swift-ci
Copy link
Contributor

swift-ci commented Dec 5, 2018

Build comment file:

No performance and code size changes


@harlanhaskins
Copy link
Contributor Author

LLDB failure is unrelated.

@swift-ci please test macOS platform

@swift-ci
Copy link
Contributor

swift-ci commented Dec 5, 2018

Build failed
Swift Test OS X Platform
Git Sha - b137928

@harlanhaskins
Copy link
Contributor Author

@swift-ci please smoke test

@harlanhaskins harlanhaskins changed the title [SILOptimizer] Add flag to stop optimization after serialization [SILOptimizer] Stop optimization after serialization if only emitting a module Dec 6, 2018
@harlanhaskins
Copy link
Contributor Author

@swift-ci please smoke test

1 similar comment
@harlanhaskins
Copy link
Contributor Author

@swift-ci please smoke test

@harlanhaskins harlanhaskins merged commit 2e50a43 into swiftlang:master Dec 6, 2018
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.

3 participants