Skip to content

Commit 45ab4f4

Browse files
authored
Merge pull request #36739 from atrick/disable-mandatory-copyprop
Disable mandatory-copy-propagation (-Onone only)
2 parents 0daf61b + b1b2eff commit 45ab4f4

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ SILPassPipelinePlan::getOnonePassPipeline(const SILOptions &Options) {
847847
P.startPipeline("non-Diagnostic Enabling Mandatory Optimizations");
848848
P.addForEachLoopUnroll();
849849
P.addMandatoryCombine();
850-
if (!P.getOptions().DisableCopyPropagation) {
850+
if (P.getOptions().EnableCopyPropagation) {
851851
// MandatoryCopyPropagation should only be run at -Onone, not -O.
852852
P.addMandatoryCopyPropagation();
853853
}

test/IRGen/unmanaged_objc_throw_func.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
1+
// RUN: %target-swift-frontend -emit-ir -enable-copy-propagation %s | %FileCheck %s
22
// REQUIRES: objc_interop
33
// REQUIRES: optimized_stdlib
44

test/Interpreter/builtin_bridge_object.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-run-simple-swift(-Onone -parse-stdlib) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG
1+
// RUN: %target-run-simple-swift(-Onone -parse-stdlib -Xfrontend -enable-copy-propagation) | %FileCheck %s --check-prefixes=CHECK,CHECK-DBG
22
// RUN: %target-run-simple-swift(-O -parse-stdlib) | %FileCheck --check-prefixes=CHECK,CHECK-OPT %s
33

44
// REQUIRES: executable_test

test/sil-passpipeline-dump/basic.test-sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
// CHECK: ---
44
// CHECK: name: non-Diagnostic Enabling Mandatory Optimizations
5-
// CHECK: passes: [ "for-each-loop-unroll", "mandatory-combine", "mandatory-copy-propagation",
6-
// CHECK: "mandatory-arc-opts" ]
5+
// CHECK: passes: [ "for-each-loop-unroll", "mandatory-combine", "mandatory-arc-opts" ]
76
// CHECK: ---
87
// CHECK: name: Serialization
98
// CHECK: passes: [ "serialize-sil", "ownership-model-eliminator" ]

0 commit comments

Comments
 (0)