Skip to content

Commit 8efafc7

Browse files
committed
Optimizer: remove the -experimental-swift-based-closure-specialization option
1 parent 259bf65 commit 8efafc7

File tree

4 files changed

+2
-17
lines changed

4 files changed

+2
-17
lines changed

include/swift/AST/SILOptions.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,6 @@ class SILOptions {
303303
/// Are we building in embedded Swift + -no-allocations?
304304
bool NoAllocations = false;
305305

306-
/// Should we use the experimental Swift based closure-specialization
307-
/// optimization pass instead of the existing C++ one.
308-
bool EnableExperimentalSwiftBasedClosureSpecialization = false;
309-
310306
/// The name of the file to which the backend should save optimization
311307
/// records.
312308
std::string OptRecordFile;

include/swift/Option/FrontendOptions.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,6 @@ def public_autolink_library :
393393
// HIDDEN FLAGS
394394
let Flags = [FrontendOption, NoDriverOption, HelpHidden] in {
395395

396-
def enable_experimental_swift_based_closure_specialization :
397-
Flag<["-"], "experimental-swift-based-closure-specialization">,
398-
HelpText<"Use the experimental Swift based closure-specialization optimization pass instead of the existing C++ one">;
399-
400396
def checked_async_objc_bridging : Joined<["-"], "checked-async-objc-bridging=">,
401397
HelpText<"Control whether checked continuations are used when bridging "
402398
"async calls from Swift to ObjC: 'on', 'off' ">;

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3226,9 +3226,6 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
32263226

32273227
Opts.NoAllocations = Args.hasArg(OPT_no_allocations);
32283228

3229-
Opts.EnableExperimentalSwiftBasedClosureSpecialization =
3230-
Args.hasArg(OPT_enable_experimental_swift_based_closure_specialization);
3231-
32323229
// If these optimizations are enabled never preserve functions for the
32333230
// debugger.
32343231
Opts.ShouldFunctionsBePreservedToDebugger =

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -789,12 +789,8 @@ static void addClosureSpecializePassPipeline(SILPassPipelinePlan &P) {
789789
// take advantage of static dispatch.
790790
P.addConstantCapturePropagation();
791791

792-
// Specialize closure.
793-
if (P.getOptions().EnableExperimentalSwiftBasedClosureSpecialization) {
794-
P.addExperimentalSwiftBasedClosureSpecialization();
795-
} else {
796-
P.addClosureSpecializer();
797-
}
792+
// TODO: replace this with the new ClosureSpecialization pass once we have OSSA at this point in the pipeline
793+
P.addClosureSpecializer();
798794

799795
// Do the second stack promotion on low-level SIL.
800796
P.addStackPromotion();

0 commit comments

Comments
 (0)