Skip to content

Commit b2a8ff5

Browse files
authored
Merge pull request swiftlang#32407 from gottesmm/pr-f0452984219b1947bbe97d25c2a159a16736d090
[ownership] Remove dead option: enable-ownership-stripping-after-serialization.
2 parents 550726a + 4643240 commit b2a8ff5

File tree

50 files changed

+48
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+48
-71
lines changed

include/swift/AST/SILOptions.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,6 @@ class SILOptions {
161161
/// Enable large loadable types IRGen pass.
162162
bool EnableLargeLoadableTypes = true;
163163

164-
/// Should the default pass pipelines strip ownership during the diagnostic
165-
/// pipeline or after serialization.
166-
bool StripOwnershipAfterSerialization = true;
167-
168164
/// The name of the file to which the backend should save optimization
169165
/// records.
170166
std::string OptRecordFile;

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,6 @@ def disable_sil_partial_apply : Flag<["-"], "disable-sil-partial-apply">,
289289
def enable_spec_devirt : Flag<["-"], "enable-spec-devirt">,
290290
HelpText<"Enable speculative devirtualization pass.">;
291291

292-
def enable_ownership_stripping_after_serialization
293-
: Flag<["-"], "enable-ownership-stripping-after-serialization">,
294-
HelpText<"Strip ownership after serialization">;
295-
296292
def disable_access_control : Flag<["-"], "disable-access-control">,
297293
HelpText<"Don't respect access control restrictions">;
298294
def enable_access_control : Flag<["-"], "enable-access-control">,

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,6 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
11011101
Args.hasArg(OPT_disable_sil_partial_apply);
11021102
Opts.VerifySILOwnership &= !Args.hasArg(OPT_disable_sil_ownership_verifier);
11031103
Opts.EnableLargeLoadableTypes |= Args.hasArg(OPT_enable_large_loadable_types);
1104-
Opts.StripOwnershipAfterSerialization |= Args.hasArg(OPT_enable_ownership_stripping_after_serialization);
11051104
Opts.EnableDynamicReplacementCanCallPreviousImplementation = !Args.hasArg(
11061105
OPT_disable_previous_implementation_calls_in_dynamic_replacements);
11071106

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ static void addMandatoryDiagnosticOptPipeline(SILPassPipelinePlan &P) {
124124
if (Options.shouldOptimize()) {
125125
P.addDestroyHoisting();
126126
}
127-
if (!Options.StripOwnershipAfterSerialization)
128-
P.addOwnershipModelEliminator();
129127
P.addMandatoryInlining();
130128
P.addMandatorySILLinker();
131129

@@ -436,8 +434,7 @@ static void addPerfEarlyModulePassPipeline(SILPassPipelinePlan &P) {
436434
P.addDifferentiabilityWitnessDevirtualizer();
437435

438436
// Strip ownership from non-transparent functions.
439-
if (P.getOptions().StripOwnershipAfterSerialization)
440-
P.addNonTransparentFunctionOwnershipModelEliminator();
437+
P.addNonTransparentFunctionOwnershipModelEliminator();
441438

442439
// Start by linking in referenced functions from other modules.
443440
P.addPerformanceSILLinker();
@@ -504,8 +501,7 @@ static void addSerializePipeline(SILPassPipelinePlan &P) {
504501
P.addSerializeSILPass();
505502

506503
// Strip any transparent functions that still have ownership.
507-
if (P.getOptions().StripOwnershipAfterSerialization)
508-
P.addOwnershipModelEliminator();
504+
P.addOwnershipModelEliminator();
509505
}
510506

511507
static void addMidLevelFunctionPipeline(SILPassPipelinePlan &P) {
@@ -758,8 +754,7 @@ SILPassPipelinePlan::getOnonePassPipeline(const SILOptions &Options) {
758754
P.addSerializeSILPass();
759755

760756
// Now strip any transparent functions that still have ownership.
761-
if (Options.StripOwnershipAfterSerialization)
762-
P.addOwnershipModelEliminator();
757+
P.addOwnershipModelEliminator();
763758

764759
// Finally perform some small transforms.
765760
P.startPipeline("Rest of Onone");

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ function(_compile_swift_files
385385
# The standard library and overlays are always built resiliently.
386386
if(SWIFTFILE_IS_STDLIB)
387387
list(APPEND swift_flags "-enable-library-evolution")
388-
list(APPEND swift_flags "-Xfrontend" "-enable-ownership-stripping-after-serialization")
389388
endif()
390389

391390
if(SWIFT_STDLIB_USE_NONATOMIC_RC)

test/DebugInfo/mandatory-inlining-ownership.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
// RUN: %target-swift-frontend -emit-sil %s -Onone -Xllvm \
44
// RUN: -sil-print-after=mandatory-inlining \
5-
// RUN: -enable-ownership-stripping-after-serialization \
65
// RUN: -Xllvm -sil-print-debuginfo -o /dev/null 2>&1 | %FileCheck %s
76

87
// CHECK: begin_borrow {{.*}} : $OSLog, loc {{.*}}, scope 5

test/SILGen/closure_script_global_escape.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-emit-silgen -module-name foo %s | %FileCheck %s
22
// RUN: %target-swift-emit-sil -module-name foo -verify %s
3-
// RUN: %target-swift-frontend -emit-sil -module-name foo -verify %s -enable-ownership-stripping-after-serialization
3+
// RUN: %target-swift-frontend -emit-sil -module-name foo -verify %s
44

55
// CHECK-LABEL: sil [ossa] @main
66

test/SILGen/closure_self_recursion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-emit-silgen -module-name foo %s | %FileCheck %s
22
// RUN: %target-swift-emit-sil -module-name foo -verify %s
3-
// RUN: %target-swift-frontend -emit-sil -module-name foo -verify %s -enable-ownership-stripping-after-serialization
3+
// RUN: %target-swift-frontend -emit-sil -module-name foo -verify %s
44

55
// CHECK-LABEL: sil [ossa] @main
66

test/SILGen/polymorphic_inout_aliasing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %target-swift-emit-sil -verify %s
2-
// RUN: %target-swift-frontend -emit-sil -verify %s -enable-ownership-stripping-after-serialization
2+
// RUN: %target-swift-frontend -emit-sil -verify %s
33

44
struct Block {}
55

test/SILOptimizer/access_enforcement_noescape_error.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %target-swift-frontend -module-name access_enforcement_noescape -enforce-exclusivity=checked -Onone -emit-sil -swift-version 4 -verify -parse-as-library %s
2-
// RUN: %target-swift-frontend -module-name access_enforcement_noescape -enforce-exclusivity=checked -Onone -emit-sil -swift-version 4 -verify -parse-as-library -enable-ownership-stripping-after-serialization %s
2+
// RUN: %target-swift-frontend -module-name access_enforcement_noescape -enforce-exclusivity=checked -Onone -emit-sil -swift-version 4 -verify -parse-as-library %s
33
// REQUIRES: asserts
44

55
// This is the subset of tests from access_enforcement_noescape.swift

0 commit comments

Comments
 (0)