Skip to content

Add an Osize option #11720

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 11 commits into from
Sep 1, 2017
Merged

Conversation

aschwaighofer
Copy link
Contributor

• Explanation: These changes add an Osize option and changes to the optimizer guarded by this option: the inliner is tuned down, speculative devirtualization, function signature specialization and array property specialization is turned off. LLVM’s OptimizeForSize attribute is added to functions and LLVM’s noinline attribute is attached to metadata and witness accessor.

• Scope of Issue: Introduction of a new feature

• Reviewed By: Erik Eckstein

• Testing: tested by the test suite

rdar://34194331

This adds an size optimization mode ("Osize") which intends to enable some
optimization but targets mainly reduced code size compared to the regular
optimized mode ("O").

rdar://33075751
Enable to run our tests with -Osize
We might be more aggressive here in the future.
This is obviously just a start. Don't inline into thunks and don't inline
methods.

Start off with half the benefit for removing a call.
This addresses most of the regressions from the compat suite and some size
saving gains.
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@aschwaighofer aschwaighofer merged commit d3ac588 into swiftlang:swift-4.0-branch Sep 1, 2017
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.

1 participant