Skip to content

Commit f641a26

Browse files
authored
Merge pull request #35495 from slavapestov/remove-obsolete-staging-flags
Frontend: Remove a couple of obsolete staging flags
2 parents b16dfcd + c456748 commit f641a26

16 files changed

+12
-34
lines changed

include/swift/AST/SILOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,6 @@ class SILOptions {
163163
/// }
164164
bool EnableDynamicReplacementCanCallPreviousImplementation = true;
165165

166-
/// Enable large loadable types IRGen pass.
167-
bool EnableLargeLoadableTypes = true;
168-
169166
/// The name of the file to which the backend should save optimization
170167
/// records.
171168
std::string OptRecordFile;

include/swift/Basic/LangOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,6 @@ namespace swift {
224224
/// Whether to dump debug info for request evaluator cycles.
225225
bool DebugDumpCycles = false;
226226

227-
/// Enable SIL type lowering
228-
bool EnableSubstSILFunctionTypesForFunctionValues = true;
229-
230227
/// Whether to diagnose an ephemeral to non-ephemeral conversion as an
231228
/// error.
232229
bool DiagnoseInvalidEphemeralnessAsError = false;

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -376,17 +376,10 @@ def suppress_static_exclusivity_swap : Flag<["-"], "suppress-static-exclusivity-
376376
def enable_sil_opaque_values : Flag<["-"], "enable-sil-opaque-values">,
377377
HelpText<"Enable SIL Opaque Values">;
378378

379-
def enable_large_loadable_types : Flag<["-"], "enable-large-loadable-types">,
380-
HelpText<"Enable Large Loadable types IRGen pass">;
381-
382379
def enable_experimental_static_assert :
383380
Flag<["-"], "enable-experimental-static-assert">,
384381
HelpText<"Enable experimental #assert">;
385382

386-
def enable_subst_sil_function_types_for_function_values :
387-
Flag<["-"], "enable-subst-sil-function-types-for-function-values">,
388-
HelpText<"Use substituted function types for SIL type lowering of function values">;
389-
390383
def enable_deserialization_recovery :
391384
Flag<["-"], "enable-deserialization-recovery">,
392385
HelpText<"Attempt to recover from missing xrefs (etc) in swiftmodules">;

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
389389
Opts.DisableImplicitConcurrencyModuleImport |=
390390
Args.hasArg(OPT_disable_implicit_concurrency_module_import);
391391

392-
Opts.EnableSubstSILFunctionTypesForFunctionValues |=
393-
Args.hasArg(OPT_enable_subst_sil_function_types_for_function_values);
394-
395392
Opts.DiagnoseInvalidEphemeralnessAsError |=
396393
Args.hasArg(OPT_enable_invalid_ephemeralness_as_error);
397394

@@ -1181,7 +1178,6 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
11811178
Opts.DisableSILPartialApply |=
11821179
Args.hasArg(OPT_disable_sil_partial_apply);
11831180
Opts.VerifySILOwnership &= !Args.hasArg(OPT_disable_sil_ownership_verifier);
1184-
Opts.EnableLargeLoadableTypes |= Args.hasArg(OPT_enable_large_loadable_types);
11851181
Opts.EnableDynamicReplacementCanCallPreviousImplementation = !Args.hasArg(
11861182
OPT_disable_previous_implementation_calls_in_dynamic_replacements);
11871183

lib/SIL/IR/SILFunctionType.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2137,9 +2137,6 @@ static CanSILFunctionType getSILFunctionType(
21372137
substFormalResultType);
21382138

21392139
bool shouldBuildSubstFunctionType = [&]{
2140-
if (!TC.Context.LangOpts.EnableSubstSILFunctionTypesForFunctionValues)
2141-
return false;
2142-
21432140
// We always use substituted function types for coroutines that are
21442141
// being lowered in the context of another coroutine, which is to say,
21452142
// for class override thunks. This is required to make the yields

lib/SIL/IR/TypeLowering.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3164,8 +3164,7 @@ TypeConverter::checkFunctionForABIDifferences(SILModule &M,
31643164
// We might still want to conditionalize this behavior even after we commit
31653165
// substituted function types, to avoid bloating
31663166
// IR for platforms that don't differentiate function type representations.
3167-
bool DifferentFunctionTypesHaveDifferentRepresentation
3168-
= Context.LangOpts.EnableSubstSILFunctionTypesForFunctionValues;
3167+
bool DifferentFunctionTypesHaveDifferentRepresentation = true;
31693168

31703169
// TODO: For C language types we should consider the attached Clang types.
31713170
if (fnTy1->getLanguage() == SILFunctionLanguage::C)

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,8 @@ SILPassPipelinePlan::getIRGenPreparePassPipeline(const SILOptions &Options) {
723723
// Hoist generic alloc_stack instructions to the entry block to enable better
724724
// llvm-ir generation for dynamic alloca instructions.
725725
P.addAllocStackHoisting();
726-
if (Options.EnableLargeLoadableTypes) {
727-
P.addLoadableByAddress();
728-
}
726+
P.addLoadableByAddress();
727+
729728
return P;
730729
}
731730

test/AutoDiff/IRGen/loadable_by_address.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -c -enable-large-loadable-types -Xllvm -sil-verify-after-pass=loadable-address %s
1+
// RUN: %target-swift-frontend -c -Xllvm -sil-verify-after-pass=loadable-address %s
22
// RUN: %target-swift-frontend -emit-sil %s | %FileCheck %s -check-prefix=CHECK-SIL
33
// RUN: %target-swift-frontend -c -Xllvm -sil-print-after=loadable-address %s 2>&1 | %FileCheck %s -check-prefix=CHECK-LBA-SIL
44
// RUN: %target-run-simple-swift

test/IRGen/big_types_corner_cases.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s
1+
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
44
// REQUIRES: OS=macosx

test/IRGen/big_types_corner_cases.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// XFAIL: CPU=powerpc64le
22
// XFAIL: CPU=s390x
3-
// RUN: %target-swift-frontend -disable-type-layout -enable-large-loadable-types %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
3+
// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
44
// REQUIRES: optimized_stdlib
55
// UNSUPPORTED: CPU=powerpc64le
66

test/IRGen/big_types_corner_cases_as_library.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -enable-large-loadable-types -disable-type-layout %s -emit-ir -parse-as-library | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
1+
// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir -parse-as-library | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
22

33
public struct BigStruct {
44
var i0 : Int32 = 0

test/IRGen/big_types_corner_cases_tiny.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
// RUN: %target-swift-frontend -enable-large-loadable-types -primary-file %s %S/big_types_corner_cases.swift -emit-ir | %FileCheck %s --check-prefix=CHECK
2+
// RUN: %target-swift-frontend -primary-file %s %S/big_types_corner_cases.swift -emit-ir | %FileCheck %s --check-prefix=CHECK
33
// REQUIRES: optimized_stdlib
44

55
// DO NOT ADD ANY MORE CODE TO THIS FILE!

test/IRGen/big_types_generic.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %swift -c -primary-file %s -enable-large-loadable-types -Xllvm -sil-print-after=loadable-address -sil-verify-all -o %t/big_types_generic.o 2>&1 | %FileCheck %s
2+
// RUN: %swift -c -primary-file %s -Xllvm -sil-print-after=loadable-address -sil-verify-all -o %t/big_types_generic.o 2>&1 | %FileCheck %s
33

44
struct Big<T> {
55
var a0 : T

test/IRGen/big_types_tests.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types -sil-verify-all | %FileCheck %s
1+
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -sil-verify-all | %FileCheck %s
22

33
// REQUIRES: CPU=x86_64
44
// REQUIRES: OS=macosx

test/SILGen/function_type_conversion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-silgen -disable-availability-checking -module-name main -enable-subst-sil-function-types-for-function-values %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -emit-silgen -disable-availability-checking -module-name main %s | %FileCheck %s
22

33
func generic<T, U>(_ f: @escaping (T) -> U) -> (T) -> U { return f }
44

test/SILGen/function_type_lowering.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-silgen -disable-availability-checking -module-name main -enable-subst-sil-function-types-for-function-values %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -emit-silgen -disable-availability-checking -module-name main %s | %FileCheck %s
22

33

44
// Similarly-abstract generic signatures should share an unsubstituted type

0 commit comments

Comments
 (0)