Skip to content

disable cross-module-optimization #42244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2022
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
3 changes: 2 additions & 1 deletion lib/SILOptimizer/PassManager/PassPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,8 @@ SILPassPipelinePlan::getPerformancePassPipeline(const SILOptions &Options) {
P.addSemanticARCOpts();
}

P.addCrossModuleOptimization();
// disabled in Swift 5.7
// P.addCrossModuleOptimization();

// It is important to serialize before any of the @_semantics
// functions are inlined, because otherwise the information about
Expand Down
2 changes: 2 additions & 0 deletions test/SILOptimizer/cross-module-optimization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
// RUN: %FileCheck %s -check-prefix=CHECK-SIL < %t/out.sil
// RUN: %FileCheck %s -check-prefix=CHECK-SIL2 < %t/out.sil

// REQUIRES: cmo_enabled

import Test

// CHECK-SIL: sil_global public_external [serialized] @_swiftEmptySetSingleton : $_SwiftEmptySetSingleton
Expand Down
1 change: 1 addition & 0 deletions test/SILOptimizer/default-cmo.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

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

// REQUIRES: cmo_enabled

import Module
import ModuleTBD
Expand Down