Skip to content

Commit e4a04c4

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 c0d7a82 commit e4a04c4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

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

179-
if (Options.shouldOptimize() && EnableDestroyHoisting) {
180-
P.addDestroyHoisting();
179+
if (Options.shouldOptimize()) {
180+
if (EnableDestroyHoisting) {
181+
P.addDestroyHoisting();
182+
} else {
183+
P.addSSADestroyHoisting();
184+
}
181185
}
182186
P.addMandatoryInlining();
183187
P.addMandatorySILLinker();

0 commit comments

Comments
 (0)