Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions include/swift/AST/SILOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,15 @@ class SILOptions {
/// Remove all runtime assertions during optimizations.
bool RemoveRuntimeAsserts = false;

/// Enable experimental support for emitting defined borrow scopes.
LexicalLifetimesOption LexicalLifetimes =
LexicalLifetimesOption::DiagnosticMarkersOnly;
/// Both emit lexical markers and use them to extend object lifetime to the
/// observable end of lexical scope.
LexicalLifetimesOption LexicalLifetimes = LexicalLifetimesOption::On;

/// Whether to run SIL copy propagation to shorten object lifetime in whatever
/// optimization pipeline is currently used.
///
/// When this is 'RequestedPassesOnly' the pipeline has default behavior.
CopyPropagationOption CopyPropagation =
CopyPropagationOption::RequestedPassesOnly;
/// When this is 'On' the pipeline has default behavior.
CopyPropagationOption CopyPropagation = CopyPropagationOption::On;

/// Controls whether the SIL ARC optimizations are run.
bool EnableARCOptimizations = true;
Expand Down
1 change: 1 addition & 0 deletions stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,7 @@ function(add_swift_target_library name)
if (SWIFTLIB_IS_STDLIB)
list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-warn-implicit-overrides")
list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-Xfrontend;-enable-ossa-modules")
list(APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-Xfrontend;-enable-lexical-lifetimes=false")
endif()

if(NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT BUILD_STANDALONE AND
Expand Down
3 changes: 2 additions & 1 deletion test/sil-passpipeline-dump/basic.test-sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

// CHECK: ---
// CHECK: name: non-Diagnostic Enabling Mandatory Optimizations
// CHECK: passes: [ "for-each-loop-unroll", "mandatory-combine", "mandatory-arc-opts" ]
// CHECK: passes: [ "for-each-loop-unroll", "mandatory-combine", "mandatory-copy-propagation",
// CHECK: "mandatory-arc-opts" ]
// CHECK: ---
// CHECK: name: Serialization
// CHECK: passes: [ "serialize-sil", "ownership-model-eliminator" ]
Expand Down