Skip to content

Remove a hack to change linkage from public_external to shared. #9731

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
May 18, 2017

Conversation

eeckstein
Copy link
Contributor

The linkage change let the compiler generate code for public functions which are imported from the stdlib - and are also available in the swiftCore library.
This got worse since we use public linkage for @_versioned internal functions in the stdlib.

Getting rid of the linkage change reduces code size a lot: up to 40% for some projects.

I didn’t see any significant impact on benchmark performance.

The linkage change let the compiler generate code for public functions which are imported from the stdlib - and are also available in the swiftCore library.
This got worse since we use public linkage for @_versioned internal functions in the stdlib.

Getting rid of the linkage change reduces code size a lot: up to 40% for some projects.

I didn’t see any significant impact on benchmark performance.
@eeckstein
Copy link
Contributor Author

@swift-ci Please smoke test and merge

@jrose-apple
Copy link
Contributor

This is safe because we always copy a function before we specialize it, right?

@jrose-apple
Copy link
Contributor

(In the resilient world we won't be able to do this, since the implementation in the stdlib could change.)

@eeckstein
Copy link
Contributor Author

Talked with Jordan offline. For now this change is safe.

@swiftix
Copy link
Contributor

swiftix commented May 18, 2017

@eeckstein Should we at least add a TODO or FIXME comment in the source code regarding resilience?

@eeckstein
Copy link
Contributor Author

@swiftix I'll file a radar. The things what we have to do are not in the source file.

@swift-ci swift-ci merged commit 281a2ec into swiftlang:master May 18, 2017
@eeckstein eeckstein deleted the no-linkage-change branch May 18, 2017 17:42
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.

4 participants