Skip to content

Disable mandatory-copy-propagation (-Onone only) #36739

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 3, 2021
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
2 changes: 1 addition & 1 deletion lib/SILOptimizer/PassManager/PassPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ SILPassPipelinePlan::getOnonePassPipeline(const SILOptions &Options) {
P.startPipeline("non-Diagnostic Enabling Mandatory Optimizations");
P.addForEachLoopUnroll();
P.addMandatoryCombine();
if (!P.getOptions().DisableCopyPropagation) {
if (P.getOptions().EnableCopyPropagation) {
// MandatoryCopyPropagation should only be run at -Onone, not -O.
P.addMandatoryCopyPropagation();
}
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/unmanaged_objc_throw_func.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
// RUN: %target-swift-frontend -emit-ir -enable-copy-propagation %s | %FileCheck %s
// REQUIRES: objc_interop
// REQUIRES: optimized_stdlib

Expand Down
2 changes: 1 addition & 1 deletion test/Interpreter/builtin_bridge_object.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %target-run-simple-swift(-Onone -parse-stdlib) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG
// RUN: %target-run-simple-swift(-Onone -parse-stdlib -Xfrontend -enable-copy-propagation) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG
// RUN: %target-run-simple-swift(-O -parse-stdlib) | %FileCheck --check-prefixes=CHECK,CHECK-OPT %s

// REQUIRES: executable_test
Expand Down
3 changes: 1 addition & 2 deletions test/sil-passpipeline-dump/basic.test-sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

// CHECK: ---
// CHECK: name: non-Diagnostic Enabling Mandatory Optimizations
// CHECK: passes: [ "for-each-loop-unroll", "mandatory-combine", "mandatory-copy-propagation",
// CHECK: "mandatory-arc-opts" ]
// CHECK: passes: [ "for-each-loop-unroll", "mandatory-combine", "mandatory-arc-opts" ]
// CHECK: ---
// CHECK: name: Serialization
// CHECK: passes: [ "serialize-sil", "ownership-model-eliminator" ]
Expand Down