mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Extend LLVM IR WME to use thunks for cross-module witness method calls. (#39528)
This enables optimizing / dead-stripping of witness methods across modules at LTO time. - Under -internalize-at-link, restrict visibility of wtables to linkage unit. - Emit thunks for cross-module wcalls when WME is enabled. - Use thunks for wcalls across modules when WME is enabled. - Adjust TBDGen to account for witness method thunks when WME is enabled. - Add an IR test to check that thunks are used when doing cross-module calls. - Add an end-to-end test case for cross-module WME.
This commit is contained in:
committed by
GitHub
parent
d9931122d2
commit
e405a9fae8
@@ -1542,6 +1542,7 @@ static bool ParseTBDGenArgs(TBDGenOptions &Opts, ArgList &Args,
|
||||
Opts.IsInstallAPI = Args.hasArg(OPT_tbd_is_installapi);
|
||||
|
||||
Opts.VirtualFunctionElimination = Args.hasArg(OPT_enable_llvm_vfe);
|
||||
Opts.WitnessMethodElimination = Args.hasArg(OPT_enable_llvm_wme);
|
||||
|
||||
if (const Arg *A = Args.getLastArg(OPT_tbd_compatibility_version)) {
|
||||
Opts.CompatibilityVersion = A->getValue();
|
||||
|
||||
Reference in New Issue
Block a user