Skip to content

Commit 0044e7d

Browse files
committed
[ownership] Move OME past SILMem2Reg
1 parent a790439 commit 0044e7d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,13 @@ void addFunctionPasses(SILPassPipelinePlan &P,
296296
P.addSROA();
297297
}
298298

299+
// Promote stack allocations to values.
300+
P.addMem2Reg();
301+
299302
// We earlier eliminated ownership if we are not compiling the stdlib. Now
300303
// handle the stdlib functions.
301304
P.addNonTransparentFunctionOwnershipModelEliminator();
302305

303-
// Promote stack allocations to values.
304-
P.addMem2Reg();
305-
306306
// Run the existential specializer Pass.
307307
P.addExistentialSpecializer();
308308

0 commit comments

Comments
 (0)