mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Added option: -enable-ossa-complete-lifetimes
Disabled by default during initial testing.
This commit is contained in:
@@ -173,6 +173,9 @@ public:
|
||||
/// If set to true, compile with the SIL Opaque Values enabled.
|
||||
bool EnableSILOpaqueValues = false;
|
||||
|
||||
/// Require linear OSSA lifetimes after SILGen
|
||||
bool OSSACompleteLifetimes = false;
|
||||
|
||||
// The kind of function bodies to skip emitting.
|
||||
FunctionBodySkipping SkipFunctionBodies = FunctionBodySkipping::None;
|
||||
|
||||
|
||||
@@ -1165,4 +1165,8 @@ def enable_emit_generic_class_ro_t_list :
|
||||
def experimental_spi_only_imports :
|
||||
Flag<["-"], "experimental-spi-only-imports">,
|
||||
HelpText<"Enable use of @_spiOnly imports">;
|
||||
|
||||
def enable_ossa_complete_lifetimes :
|
||||
Flag<["-"], "enable-ossa-complete-lifetimes">,
|
||||
HelpText<"Require linear OSSA lifetimes after SILGen">;
|
||||
} // end let Flags = [FrontendOption, NoDriverOption, HelpHidden]
|
||||
|
||||
@@ -1985,6 +1985,8 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
|
||||
parseExclusivityEnforcementOptions(A, Opts, Diags);
|
||||
}
|
||||
|
||||
Opts.OSSACompleteLifetimes |= Args.hasArg(OPT_enable_ossa_complete_lifetimes);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,6 +109,10 @@ static llvm::cl::opt<bool>
|
||||
EnableSILOpaqueValues("enable-sil-opaque-values",
|
||||
llvm::cl::desc("Compile the module with sil-opaque-values enabled."));
|
||||
|
||||
static llvm::cl::opt<bool>
|
||||
EnableOSSACompleteLifetimes("enable-ossa-complete-lifetimes",
|
||||
llvm::cl::desc("Compile the module with sil-opaque-values enabled."));
|
||||
|
||||
static llvm::cl::opt<bool>
|
||||
EnableObjCInterop("enable-objc-interop",
|
||||
llvm::cl::desc("Enable Objective-C interoperability."));
|
||||
@@ -659,6 +663,7 @@ int main(int argc, char **argv) {
|
||||
SILOpts.IgnoreAlwaysInline = IgnoreAlwaysInline;
|
||||
SILOpts.EnableOSSAModules = EnableOSSAModules;
|
||||
SILOpts.EnableSILOpaqueValues = EnableSILOpaqueValues;
|
||||
SILOpts.OSSACompleteLifetimes = EnableOSSACompleteLifetimes;
|
||||
|
||||
if (CopyPropagationState) {
|
||||
SILOpts.CopyPropagation = *CopyPropagationState;
|
||||
|
||||
Reference in New Issue
Block a user