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
4 changes: 0 additions & 4 deletions include/swift/AST/SILOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ class SILOptions {
/// purposes.
bool EnableOSSAOptimizations = true;

/// Controls whether to turn on speculative devirtualization.
/// It is turned off by default.
bool EnableSpeculativeDevirtualization = false;

/// Controls whether to emit actor data-race checks.
bool EnableActorDataRaceChecks = false;

Expand Down
2 changes: 1 addition & 1 deletion include/swift/Option/FrontendOptions.td
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def disable_sil_partial_apply : Flag<["-"], "disable-sil-partial-apply">,
HelpText<"Disable use of partial_apply in SIL generation">;

def enable_spec_devirt : Flag<["-"], "enable-spec-devirt">,
HelpText<"Enable speculative devirtualization pass.">;
HelpText<"Deprecated, has no effect">;

def enable_async_demotion : Flag<["-"], "enable-experimental-async-demotion">,
HelpText<"Enables an optimization pass to demote async functions.">;
Expand Down
2 changes: 0 additions & 2 deletions include/swift/SILOptimizer/PassManager/Passes.def
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,6 @@ LEGACY_PASS(SimplifyBBArgs, "simplify-bb-args",
"SIL Block Argument Simplification")
LEGACY_PASS(SimplifyCFG, "simplify-cfg",
"SIL CFG Simplification")
LEGACY_PASS(SpeculativeDevirtualization, "specdevirt",
"Speculative Devirtualization via Guarded Calls")
LEGACY_PASS(SplitAllCriticalEdges, "split-critical-edges",
"Split all Critical Edges in the SIL CFG")
LEGACY_PASS(SplitNonCondBrCriticalEdges, "split-non-cond_br-critical-edges",
Expand Down
5 changes: 0 additions & 5 deletions lib/DriverTool/sil_opt_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,6 @@ struct SILOptOptions {
VerifyExclusivity = llvm::cl::opt<bool>("enable-verify-exclusivity",
llvm::cl::desc("Verify the access markers used to enforce exclusivity."));

llvm::cl::opt<bool>
EnableSpeculativeDevirtualization = llvm::cl::opt<bool>("enable-spec-devirt",
llvm::cl::desc("Enable Speculative Devirtualization pass."));

llvm::cl::opt<bool>
EnableAsyncDemotion = llvm::cl::opt<bool>("enable-async-demotion",
llvm::cl::desc("Enables an optimization pass to demote async functions."));
Expand Down Expand Up @@ -891,7 +887,6 @@ int sil_opt_main(ArrayRef<const char *> argv, void *MainAddr) {
SILOpts.EmitVerboseSIL |= options.EmitVerboseSIL;
SILOpts.EmitSortedSIL |= options.EmitSortedSIL;

SILOpts.EnableSpeculativeDevirtualization = options.EnableSpeculativeDevirtualization;
SILOpts.EnableAsyncDemotion = options.EnableAsyncDemotion;
SILOpts.EnableThrowsPrediction = options.EnableThrowsPrediction;
SILOpts.EnableNoReturnCold = options.EnableNoReturnCold;
Expand Down
1 change: 0 additions & 1 deletion lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3081,7 +3081,6 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
Opts.EnableOSSAOptimizations &= !Args.hasArg(OPT_disable_ossa_opts);
Opts.EnableSILOpaqueValues = Args.hasFlag(
OPT_enable_sil_opaque_values, OPT_disable_sil_opaque_values, false);
Opts.EnableSpeculativeDevirtualization |= Args.hasArg(OPT_enable_spec_devirt);
Opts.EnableAsyncDemotion |= Args.hasArg(OPT_enable_async_demotion);
Opts.EnableThrowsPrediction = Args.hasFlag(
OPT_enable_throws_prediction, OPT_disable_throws_prediction,
Expand Down
5 changes: 0 additions & 5 deletions lib/SILOptimizer/PassManager/PassPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,11 +795,6 @@ static void addClosureSpecializePassPipeline(SILPassPipelinePlan &P) {
// Do the second stack promotion on low-level SIL.
P.addStackPromotion();

// Speculate virtual call targets.
if (P.getOptions().EnableSpeculativeDevirtualization) {
P.addSpeculativeDevirtualization();
}

// There should be at least one SILCombine+SimplifyCFG between the
// ClosureSpecializer, etc. and the last inliner. Cleaning up after these
// passes can expose more inlining opportunities.
Expand Down
1 change: 0 additions & 1 deletion lib/SILOptimizer/Transforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ target_sources(swiftSILOptimizer PRIVATE
DestroyAddrHoisting.cpp
SimplifyCFG.cpp
Sink.cpp
SpeculativeDevirtualizer.cpp
StringOptimization.cpp)

Loading