Optimizer: remove the obsolete SpeculativeDevirtualization pass

This pass has been disabled since a very long time (because it's terrible for code size).
It does not work for OSSA. Therefore it cannot be enabled anymore (as is) once we have OSSA throughout the pipeline.
So it's time to completely remove it.
This commit is contained in:
Erik Eckstein
2025-10-13 10:14:38 +02:00
parent 41f680cb93
commit 65e4c10113
28 changed files with 32 additions and 1773 deletions

View File

@@ -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,