Skip to content

Commit a32bfb0

Browse files
committed
Now that -enable-ossa-modules has been fixed, remove redundant -sil-enable-late-ome
1 parent ee50783 commit a32bfb0

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ static llvm::cl::opt<bool> SILViewSILGenCFG(
5555
"sil-view-silgen-cfg", llvm::cl::init(false),
5656
llvm::cl::desc("Enable the sil cfg viewer pass before diagnostics"));
5757

58-
static llvm::cl::opt<bool>
59-
SILEnableLateOME("sil-enable-late-ome", llvm::cl::init(false),
60-
llvm::cl::desc("Enable late OwnershipModel elimination"));
61-
6258
//===----------------------------------------------------------------------===//
6359
// Diagnostic Pass Pipeline
6460
//===----------------------------------------------------------------------===//
@@ -382,7 +378,7 @@ void addFunctionPasses(SILPassPipelinePlan &P,
382378
P.addDevirtualizer();
383379
P.addARCSequenceOpts();
384380

385-
if (P.getOptions().EnableOSSAModules || SILEnableLateOME) {
381+
if (P.getOptions().EnableOSSAModules) {
386382
// We earlier eliminated ownership if we are not compiling the stdlib. Now
387383
// handle the stdlib functions, re-simplifying, eliminating ARC as we do.
388384
if (!P.getOptions().DisableCopyPropagation) {
@@ -408,7 +404,7 @@ void addFunctionPasses(SILPassPipelinePlan &P,
408404
}
409405

410406
// Clean up Semantic ARC before we perform additional post-inliner opts.
411-
if (P.getOptions().EnableOSSAModules || SILEnableLateOME) {
407+
if (P.getOptions().EnableOSSAModules) {
412408
if (!P.getOptions().DisableCopyPropagation) {
413409
P.addCopyPropagation();
414410
}
@@ -475,7 +471,7 @@ void addFunctionPasses(SILPassPipelinePlan &P,
475471
P.addARCSequenceOpts();
476472

477473
// Run a final round of ARC opts when ownership is enabled.
478-
if (P.getOptions().EnableOSSAModules || SILEnableLateOME) {
474+
if (P.getOptions().EnableOSSAModules) {
479475
if (!P.getOptions().DisableCopyPropagation) {
480476
P.addCopyPropagation();
481477
}
@@ -532,7 +528,7 @@ static void addPerfEarlyModulePassPipeline(SILPassPipelinePlan &P) {
532528
if (P.getOptions().StopOptimizationBeforeLoweringOwnership)
533529
return;
534530

535-
if (!P.getOptions().EnableOSSAModules && !SILEnableLateOME)
531+
if (!P.getOptions().EnableOSSAModules)
536532
P.addNonTransparentFunctionOwnershipModelEliminator();
537533

538534
// Start by linking in referenced functions from other modules.
@@ -828,7 +824,7 @@ SILPassPipelinePlan::getPerformancePassPipeline(const SILOptions &Options) {
828824

829825
// Run one last copy propagation/semantic arc opts run before serialization/us
830826
// lowering ownership.
831-
if (P.getOptions().EnableOSSAModules || SILEnableLateOME) {
827+
if (P.getOptions().EnableOSSAModules) {
832828
if (!P.getOptions().DisableCopyPropagation) {
833829
P.addCopyPropagation();
834830
}

test/SILOptimizer/opaque_values_mandatory.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-sil-opt -diagnostics -enable-sil-opaque-values %s | \
22
// RUN: %target-sil-opt -Onone-performance -enable-sil-verify-all \
33
// RUN: -enable-sil-opaque-values -emit-sorted-sil \
4-
// RUN: -sil-enable-late-ome -enable-copy-propagation | \
4+
// RUN: -enable-ossa-modules -enable-copy-propagation | \
55
// RUN: %FileCheck %s
66

77
import Builtin

test/SILOptimizer/sil_combine_apply_ossa.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-sil-opt -sil-enable-late-ome -enable-copy-propagation -enable-sil-verify-all %s -sil-combine -sil-combine-disable-alloc-stack-opts | %FileCheck %s
1+
// RUN: %target-sil-opt -enable-ossa-modules -enable-copy-propagation -enable-sil-verify-all %s -sil-combine -sil-combine-disable-alloc-stack-opts | %FileCheck %s
22

33
import Swift
44
import Builtin

0 commit comments

Comments
 (0)