Skip to content

Frontend: Remove a couple of obsolete staging flags #35495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
3 changes: 0 additions & 3 deletions include/swift/AST/SILOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,6 @@ class SILOptions {
/// }
bool EnableDynamicReplacementCanCallPreviousImplementation = true;

/// Enable large loadable types IRGen pass.
bool EnableLargeLoadableTypes = true;

/// The name of the file to which the backend should save optimization
/// records.
std::string OptRecordFile;
Expand Down
3 changes: 0 additions & 3 deletions include/swift/Basic/LangOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ namespace swift {
/// Whether to dump debug info for request evaluator cycles.
bool DebugDumpCycles = false;

/// Enable SIL type lowering
bool EnableSubstSILFunctionTypesForFunctionValues = true;

/// Whether to diagnose an ephemeral to non-ephemeral conversion as an
/// error.
bool DiagnoseInvalidEphemeralnessAsError = false;
Expand Down
7 changes: 0 additions & 7 deletions include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -376,17 +376,10 @@ def suppress_static_exclusivity_swap : Flag<["-"], "suppress-static-exclusivity-
def enable_sil_opaque_values : Flag<["-"], "enable-sil-opaque-values">,
HelpText<"Enable SIL Opaque Values">;

def enable_large_loadable_types : Flag<["-"], "enable-large-loadable-types">,
HelpText<"Enable Large Loadable types IRGen pass">;

def enable_experimental_static_assert :
Flag<["-"], "enable-experimental-static-assert">,
HelpText<"Enable experimental #assert">;

def enable_subst_sil_function_types_for_function_values :
Flag<["-"], "enable-subst-sil-function-types-for-function-values">,
HelpText<"Use substituted function types for SIL type lowering of function values">;

def enable_deserialization_recovery :
Flag<["-"], "enable-deserialization-recovery">,
HelpText<"Attempt to recover from missing xrefs (etc) in swiftmodules">;
Expand Down
4 changes: 0 additions & 4 deletions lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.DisableImplicitConcurrencyModuleImport |=
Args.hasArg(OPT_disable_implicit_concurrency_module_import);

Opts.EnableSubstSILFunctionTypesForFunctionValues |=
Args.hasArg(OPT_enable_subst_sil_function_types_for_function_values);

Opts.DiagnoseInvalidEphemeralnessAsError |=
Args.hasArg(OPT_enable_invalid_ephemeralness_as_error);

Expand Down Expand Up @@ -1181,7 +1178,6 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
Opts.DisableSILPartialApply |=
Args.hasArg(OPT_disable_sil_partial_apply);
Opts.VerifySILOwnership &= !Args.hasArg(OPT_disable_sil_ownership_verifier);
Opts.EnableLargeLoadableTypes |= Args.hasArg(OPT_enable_large_loadable_types);
Opts.EnableDynamicReplacementCanCallPreviousImplementation = !Args.hasArg(
OPT_disable_previous_implementation_calls_in_dynamic_replacements);

Expand Down
3 changes: 0 additions & 3 deletions lib/SIL/IR/SILFunctionType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2137,9 +2137,6 @@ static CanSILFunctionType getSILFunctionType(
substFormalResultType);

bool shouldBuildSubstFunctionType = [&]{
if (!TC.Context.LangOpts.EnableSubstSILFunctionTypesForFunctionValues)
return false;

// We always use substituted function types for coroutines that are
// being lowered in the context of another coroutine, which is to say,
// for class override thunks. This is required to make the yields
Expand Down
3 changes: 1 addition & 2 deletions lib/SIL/IR/TypeLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3164,8 +3164,7 @@ TypeConverter::checkFunctionForABIDifferences(SILModule &M,
// We might still want to conditionalize this behavior even after we commit
// substituted function types, to avoid bloating
// IR for platforms that don't differentiate function type representations.
bool DifferentFunctionTypesHaveDifferentRepresentation
= Context.LangOpts.EnableSubstSILFunctionTypesForFunctionValues;
bool DifferentFunctionTypesHaveDifferentRepresentation = true;

// TODO: For C language types we should consider the attached Clang types.
if (fnTy1->getLanguage() == SILFunctionLanguage::C)
Expand Down
5 changes: 2 additions & 3 deletions lib/SILOptimizer/PassManager/PassPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,9 +721,8 @@ SILPassPipelinePlan::getIRGenPreparePassPipeline(const SILOptions &Options) {
// Hoist generic alloc_stack instructions to the entry block to enable better
// llvm-ir generation for dynamic alloca instructions.
P.addAllocStackHoisting();
if (Options.EnableLargeLoadableTypes) {
P.addLoadableByAddress();
}
P.addLoadableByAddress();

return P;
}

Expand Down
2 changes: 1 addition & 1 deletion test/AutoDiff/IRGen/loadable_by_address.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -c -enable-large-loadable-types -Xllvm -sil-verify-after-pass=loadable-address %s
// RUN: %target-swift-frontend -c -Xllvm -sil-verify-after-pass=loadable-address %s
// RUN: %target-swift-frontend -emit-sil %s | %FileCheck %s -check-prefix=CHECK-SIL
// RUN: %target-swift-frontend -c -Xllvm -sil-print-after=loadable-address %s 2>&1 | %FileCheck %s -check-prefix=CHECK-LBA-SIL
// RUN: %target-run-simple-swift
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/big_types_corner_cases.sil
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: OS=macosx
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/big_types_corner_cases.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// XFAIL: CPU=powerpc64le
// XFAIL: CPU=s390x
// RUN: %target-swift-frontend -disable-type-layout -enable-large-loadable-types %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
// REQUIRES: optimized_stdlib
// UNSUPPORTED: CPU=powerpc64le

Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/big_types_corner_cases_as_library.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 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
// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir -parse-as-library | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize

public struct BigStruct {
var i0 : Int32 = 0
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/big_types_corner_cases_tiny.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

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

// DO NOT ADD ANY MORE CODE TO THIS FILE!
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/big_types_generic.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %empty-directory(%t)
// 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
// 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

struct Big<T> {
var a0 : T
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/big_types_tests.sil
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types -sil-verify-all | %FileCheck %s
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -sil-verify-all | %FileCheck %s

// REQUIRES: CPU=x86_64
// REQUIRES: OS=macosx
Expand Down
2 changes: 1 addition & 1 deletion test/SILGen/function_type_conversion.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -emit-silgen -disable-availability-checking -module-name main -enable-subst-sil-function-types-for-function-values %s | %FileCheck %s
// RUN: %target-swift-frontend -emit-silgen -disable-availability-checking -module-name main %s | %FileCheck %s

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

Expand Down
2 changes: 1 addition & 1 deletion test/SILGen/function_type_lowering.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -emit-silgen -disable-availability-checking -module-name main -enable-subst-sil-function-types-for-function-values %s | %FileCheck %s
// RUN: %target-swift-frontend -emit-silgen -disable-availability-checking -module-name main %s | %FileCheck %s


// Similarly-abstract generic signatures should share an unsubstituted type
Expand Down