-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[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
Conversation
@swift-ci test |
d3fb168
to
ba6ee78
Compare
@swift-ci test |
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. |
Build failed |
Build failed |
@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. |
There was a problem hiding this 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.
ba6ee78
to
91317c7
Compare
@swift-ci smoke test |
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. |
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.