mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Once the flag is flipped, ownership stripping will no longer be done in the diagnostics pipeline. Instead what will happen is that: * Onone: At -Onone, we run the entire diagnostics pipeline with ownership enabled and do not strip ownership until after we serialize in the Onone "optimization" pass pipeline plan. * -O: At -O, to temporarily work around serialization issues with transparent functions, we strip ownership from all but transparent functions at the beginning of the performance pipeline, serialize, and then strip ownership from transparent functions. For this to work, I needed to make sure that the performance pipeline passes that do not support ownership SIL, just skip such functions. So the transparent functions will arrive (mostly) untouched in serialized SIL and the rest of the pipeline will optimize non-transparent functions as they should. The key thing about the -O change is that it /should/ be performance neutral since after we serialize we re-run the entire pipeline so we can optimize semantic functions that we only can inline after we serialize.
5.4 KiB
5.4 KiB