Skip to content

Commit 8bc6f83

Browse files
authored
Merge pull request #34134 from gottesmm/pr-d16ec3e1fe4adcc9f0993211cdbc57fd7024a93e
[ownership] Move ownership lowering past SROA.
2 parents 48b73fd + 4c8d09f commit 8bc6f83

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,17 +289,17 @@ void addFunctionPasses(SILPassPipelinePlan &P,
289289
// Split up opaque operations (copy_addr, retain_value, etc.).
290290
P.addLowerAggregateInstrs();
291291

292-
// We earlier eliminated ownership if we are not compiling the stdlib. Now
293-
// handle the stdlib functions.
294-
P.addNonTransparentFunctionOwnershipModelEliminator();
295-
296292
// Split up operations on stack-allocated aggregates (struct, tuple).
297293
if (OpLevel == OptimizationLevelKind::HighLevel) {
298294
P.addEarlySROA();
299295
} else {
300296
P.addSROA();
301297
}
302298

299+
// We earlier eliminated ownership if we are not compiling the stdlib. Now
300+
// handle the stdlib functions.
301+
P.addNonTransparentFunctionOwnershipModelEliminator();
302+
303303
// Promote stack allocations to values.
304304
P.addMem2Reg();
305305

0 commit comments

Comments
 (0)