Skip to content

Commit bc12414

Browse files
committed
disable cross-module-optimization
There are still some problems, e.g. in the swift driver, which need to be resolved before we can enable CMO
1 parent f4d58b3 commit bc12414

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,8 @@ SILPassPipelinePlan::getPerformancePassPipeline(const SILOptions &Options) {
862862
P.addSemanticARCOpts();
863863
}
864864

865-
P.addCrossModuleOptimization();
865+
// disabled in Swift 5.7
866+
// P.addCrossModuleOptimization();
866867

867868
// It is important to serialize before any of the @_semantics
868869
// functions are inlined, because otherwise the information about

test/SILOptimizer/cross-module-optimization.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
// RUN: %FileCheck %s -check-prefix=CHECK-SIL < %t/out.sil
2626
// RUN: %FileCheck %s -check-prefix=CHECK-SIL2 < %t/out.sil
2727

28+
// REQUIRES: cmo_enabled
29+
2830
import Test
2931

3032
// CHECK-SIL: sil_global public_external [serialized] @_swiftEmptySetSingleton : $_SwiftEmptySetSingleton

test/SILOptimizer/default-cmo.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// RUN: %target-build-swift -O -wmo -module-name=Main -I%t %s -emit-sil | %FileCheck %s
99

10+
// REQUIRES: cmo_enabled
1011

1112
import Module
1213
import ModuleTBD

0 commit comments

Comments
 (0)