Commit Graph

5 Commits

Author SHA1 Message Date
Erik Eckstein
80a22e332f cross-module-optimization: be more conservative with references to non-public functions
We need to make serializing shared functions more robust. Until then, be more conservative with non-public functions.
2022-02-11 15:53:47 +01:00
Erik Eckstein
8c52853b9e cross-module-optimization: fix a problem with global variables
don't make public external globals non-external
2022-02-11 15:53:47 +01:00
Erik Eckstein
5bc1633883 cross-module-optimization: don't make imported type declarations usable-from-inline.
Fixes unresolved-symbol linker errors.

rdar://87930768
2022-02-02 19:29:29 +01:00
Erik Eckstein
6ee19f0bea Do conservative cross-module-optimization by default
The "regular" CMO is done with the option `-cross-module-optimization`. It's good for performance but can increase code size.
Now, which this change CMO is also done if the option is not given, but in a very conservative way. Only very small functions are serialized and not additional type metadata is kept alive.

rdar://70082202
2022-01-12 12:43:53 +01:00
Erik Eckstein
408cf02bc8 rework cross-module-optimization
* rename the CrossModuleSerializationSetup pass to simply CrossModuleOptimization
* remove the CMO specific serializer pass. Instead run the CrossModuleSerializationSetup pass directly before the standard serializer pass.
* correctly handle shared functions (e.g. specializations)
* refactoring
2021-12-20 11:33:02 +01:00