Commit Graph

7 Commits

Author SHA1 Message Date
Dario Rexin
bde7daa2f2 [SILOptimizer] Don't apply CMO to key paths that reference inaccessible properties
rdar://145095088
2025-02-24 23:07:18 -08:00
Erik Eckstein
ff15d54c6c Deserializer: fix a crash with global variables and cross-module-optimization
In case of cross-module-optimizations it can happen that a private global variable is changed to public,
but it's declaration is not available in the module file.
2024-07-02 14:03:02 +02:00
John McCall
82d9e4cb59 Fix a crash when serializing variadic generic tuple code under -wmo
It seems really unfortunate that we use SILCloner to, basically,
implement a recursive visitor of the types used in a SIL function,
but apparently it's what we do.

Fixes #72117.
2024-04-11 17:22:10 -04:00
Arnold Schwaighofer
69471700b0 CrossModuleOptimization: Don't serialize pre-specialized public entry points
We should continue to use the public pre-specialized entry point from another module. But not block other uses of generic specializations.
2022-05-05 08:01:09 -07: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
27e1220a67 CMO: fix handling of static globals with function references
Referenced functions within the initializer of a SILGlobalVariable must be handled like referenced functions in other functions.

Fixes an assert crash when compiling with -cross-module-optimization
2021-10-13 15:22:58 +02:00
Erik Eckstein
c1e1bf2bd6 cross-module-optimization: Don't serialize functions which reference implementationOnly-imported functions
The check for implementationOnly imports was already done for types, but it was missing for functions.
Fixes a crash when implementationOnly-importing a C module.

https://bugs.swift.org/browse/SR-15048
rdar://81701218
2021-08-19 20:27:56 +02:00