Skip to content

Commit 0656266

Browse files
committed
[SILOpt] Run SSADestroyHoisting in mandatory pipeline.
Run SSADestroyHoisting in the pipeline where DestroyHoisting was previously running. Avoid extra ARC traffic that having no form of destroy hoisting in the mandatory pipeline results in. rdar://90495704
1 parent 1e821f2 commit 0656266

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,12 @@ static void addMandatoryDiagnosticOptPipeline(SILPassPipelinePlan &P) {
153153
P.addSILSkippingChecker();
154154
#endif
155155

156-
if (Options.shouldOptimize() && EnableDestroyHoisting) {
157-
P.addDestroyHoisting();
156+
if (Options.shouldOptimize()) {
157+
if (EnableDestroyHoisting) {
158+
P.addDestroyHoisting();
159+
} else {
160+
P.addSSADestroyHoisting();
161+
}
158162
}
159163
P.addMandatoryInlining();
160164
P.addMandatorySILLinker();

test/SILOptimizer/performance-annotations.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// RUN: %target-swift-frontend -experimental-performance-annotations -emit-sil %s -o /dev/null -verify
22
// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
3-
// REQUIRES: rdar90495704
43

54
protocol P {
65
func protoMethod(_ a: Int) -> Int

0 commit comments

Comments
 (0)