Skip to content

[ownership] Make whether or not we serialize in OSSA form based off of a flag instead of off of whether or not we are processing the stdlib. #36031

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

Conversation

gottesmm
Copy link
Contributor

I added a change to CMake so that the stdlib still gets the option passed in so
should be NFC.

I also fixed a small mistake where some optimizations that we intended to run early when optimized ossa was being serialized were turned off. Luckily there is no difference (the opts would have just run on non-ossa SIL and thus would have been a no-op)... but turning these on are important since we found it made a difference in a benchmark that regressed.

@gottesmm gottesmm requested review from meg-gupta and atrick February 18, 2021 05:59
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm gottesmm force-pushed the pr-3c9f3fdecad83d37bd4c97bc5116da95c64279e8 branch from d3fb168 to ba6ee78 Compare February 18, 2021 06:02
@gottesmm
Copy link
Contributor Author

@swift-ci test

@atrick
Copy link
Contributor

atrick commented Feb 18, 2021

Isn't this orthogonal to -O/-Onone?

Doesn't this affect deserialization too, in the sense that imported modules need to be OSSA?

If both those answers are yes, then it should be called '-enable-ossa-modules', which would be an option that users could understand and basically the end-goal for this round of OSSA migration.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ba6ee783e5ff7a0bce0d9579261d5d79c962bcdc

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ba6ee783e5ff7a0bce0d9579261d5d79c962bcdc

@gottesmm
Copy link
Contributor Author

@atrick it isn't orthogonal to -O/-Onone since at -Onone I think we always serialize in OSSA today (just looking at the pass pipeline). Instead this is only about enabling this when compiling in -O. What about -enable-optimized-ossa-modules.

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.

Looks good. I suggest enable-ossa-modules because we don't have any reason to separately control debug builds. Whereas I'm sure we'll want an -enable-optimized-ossa flag at some point to selectively push OSSA deeper in the pipeline and those shouldn't get mixed up.

…f the flag -enable-ossa-modules.

I added a change to CMake so that the stdlib still gets the option passed in so
should be NFC.
@gottesmm gottesmm force-pushed the pr-3c9f3fdecad83d37bd4c97bc5116da95c64279e8 branch from ba6ee78 to 91317c7 Compare February 23, 2021 03:08
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

Turns out the problem was that there were certain tests that were simulating the stdlib and were relying on this behavior for serialization. I added the flag to the tests.

@gottesmm gottesmm merged commit 6189e8e into swiftlang:main Feb 23, 2021
@gottesmm gottesmm deleted the pr-3c9f3fdecad83d37bd4c97bc5116da95c64279e8 branch February 23, 2021 18: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.

3 participants