Skip to content

Use -enable-ossa-modules for all of stdlib/public #39478

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
Sep 30, 2021

Conversation

meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Sep 28, 2021

This will pass -enable-ossa-modules while compiling all of stdlib/public not just stdlib/public/core.
With this, even non-transparent functions will have their ownership eliminated later in the pipeline.

@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta
Copy link
Contributor Author

@swift-ci benchmark

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 1b2e60791eaf971c758505429b3d03e975b2760a

@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta
Copy link
Contributor Author

@swift-ci benchmark

@swift-ci
Copy link
Contributor

Performance (x86_64): -O

Regression OLD NEW DELTA RATIO
ArrayAppendGenericStructs 1340 1540 +14.9% 0.87x (?)
 
Improvement OLD NEW DELTA RATIO
Data.init.Sequence.64kB.Count.RE 2 1 -50.0% 2.00x
StringInterpolationManySmallSegments 8700 7300 -16.1% 1.19x (?)
FlattenListLoop 1570 1386 -11.7% 1.13x (?)
DataToStringEmpty 600 550 -8.3% 1.09x (?)
FlattenListFlatMap 4299 3961 -7.9% 1.09x (?)

Code size: -O

Performance (x86_64): -Osize

Regression OLD NEW DELTA RATIO
ArrayAppendGenericStructs 610 1250 +104.9% 0.49x (?)
 
Improvement OLD NEW DELTA RATIO
FlattenListLoop 1565 935 -40.3% 1.67x (?)

Code size: -Osize

Performance (x86_64): -Onone

Improvement OLD NEW DELTA RATIO
NSStringConversion.MutableCopy.Rebridge.UTF8 486 454 -6.6% 1.07x (?)

Code size: -swiftlibs

Improvement OLD NEW DELTA RATIO
libswiftStdlibUnittest.dylib 327680 311296 -5.0% 1.05x
How to read the data The tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.

If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.

Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac mini
  Model Identifier: Macmini8,1
  Processor Name: 6-Core Intel Core i7
  Processor Speed: 3.2 GHz
  Number of Processors: 1
  Total Number of Cores: 6
  L2 Cache (per Core): 256 KB
  L3 Cache: 12 MB
  Memory: 64 GB

@swiftlang swiftlang deleted a comment from swift-ci Sep 28, 2021
@meg-gupta meg-gupta marked this pull request as ready for review September 30, 2021 02:42
@meg-gupta meg-gupta changed the title Enable serialization in OSSA for all of stdlib/public Use -enable-ossa-modules for all of stdlib/public Sep 30, 2021
@meg-gupta
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

I like the idea. If this sticks, can we get rid of all the special case modes for transparent functions and stdlib builds?

@atrick
Copy link
Contributor

atrick commented Sep 30, 2021

list(APPEND swift_stdlib_compile_flags "-Xfrontend" "-enable-ossa-modules")

Do we still need this? Will the flag be passed twice to the stldib build now?

With this, even non-transparent functions will have their ownership eliminated later in the pipeline
@meg-gupta
Copy link
Contributor Author

meg-gupta commented Sep 30, 2021

list(APPEND swift_stdlib_compile_flags "-Xfrontend" "-enable-ossa-modules")

Do we still need this? Will the flag be passed twice to the stldib build now?

@atrick Thanks. I got rid of it in the latest update.

list(APPEND swift_stdlib_compile_flags "-Xfrontend" "-enable-ossa-modules")

Do we still need this? Will the flag be passed twice to the stldib build now?

Good point. I need to test this, but I think we still need these modes for the deserialization hooks we install in OME.

@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta meg-gupta merged commit 83c0234 into swiftlang:main Sep 30, 2021
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