mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Turn off speculative devirtualization by default. (#29359)
Turn off speculative devirtualization by default. Add a flag to support enabling the pass. Fixes rdar://58778959 and rdar://58429282
This commit is contained in:
@@ -57,6 +57,10 @@ public:
|
||||
/// purposes.
|
||||
bool EnableOSSAOptimizations = true;
|
||||
|
||||
/// Controls whether to turn on speculative devirtualization.
|
||||
/// It is turned off by default.
|
||||
bool EnableSpeculativeDevirtualization = false;
|
||||
|
||||
/// Should we run any SIL performance optimizations
|
||||
///
|
||||
/// Useful when you want to enable -O LLVM opts but not -O SIL opts.
|
||||
|
||||
@@ -282,6 +282,9 @@ def disable_ossa_opts : Flag<["-"], "disable-ossa-opts">,
|
||||
def disable_sil_partial_apply : Flag<["-"], "disable-sil-partial-apply">,
|
||||
HelpText<"Disable use of partial_apply in SIL generation">;
|
||||
|
||||
def enable_spec_devirt : Flag<["-"], "enable-spec-devirt">,
|
||||
HelpText<"Enable speculative devirtualization pass.">;
|
||||
|
||||
def enable_ownership_stripping_after_serialization
|
||||
: Flag<["-"], "enable-ownership-stripping-after-serialization">,
|
||||
HelpText<"Strip ownership after serialization">;
|
||||
|
||||
Reference in New Issue
Block a user