From c3bc8e8ef93f4ad5d7eb39bb0334bc00bef8de74 Mon Sep 17 00:00:00 2001 From: Michael Gottesman Date: Tue, 29 Sep 2020 16:37:59 -0500 Subject: [PATCH] [ownership] Move ownership elimination on the stdlib passed lower aggregate instrs. --- lib/SILOptimizer/PassManager/PassPipeline.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/SILOptimizer/PassManager/PassPipeline.cpp b/lib/SILOptimizer/PassManager/PassPipeline.cpp index 8f6fcc0a52e8b..4a17701499818 100644 --- a/lib/SILOptimizer/PassManager/PassPipeline.cpp +++ b/lib/SILOptimizer/PassManager/PassPipeline.cpp @@ -286,13 +286,13 @@ void addFunctionPasses(SILPassPipelinePlan &P, // Optimize copies from a temporary (an "l-value") to a destination. P.addTempLValueOpt(); + // Split up opaque operations (copy_addr, retain_value, etc.). + P.addLowerAggregateInstrs(); + // We earlier eliminated ownership if we are not compiling the stdlib. Now // handle the stdlib functions. P.addNonTransparentFunctionOwnershipModelEliminator(); - // Split up opaque operations (copy_addr, retain_value, etc.). - P.addLowerAggregateInstrs(); - // Split up operations on stack-allocated aggregates (struct, tuple). if (OpLevel == OptimizationLevelKind::HighLevel) { P.addEarlySROA();