Skip to content

Revert "[ownership] Move OME after CopyForwarding" #34081

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions lib/SILOptimizer/PassManager/PassPipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,10 +283,6 @@ void addFunctionPasses(SILPassPipelinePlan &P,
// splits up copy_addr.
P.addCopyForwarding();

// We earlier eliminated ownership if we are not compiling the stdlib. Now
// handle the stdlib functions.
P.addNonTransparentFunctionOwnershipModelEliminator();

// Optimize copies from a temporary (an "l-value") to a destination.
P.addTempLValueOpt();

Expand Down Expand Up @@ -493,7 +489,10 @@ static void addHighLevelFunctionPipeline(SILPassPipelinePlan &P) {
// FIXME: update EagerSpecializer to be a function pass!
P.addEagerSpecializer();

// stdlib ownership model elimination is done within addFunctionPasses
// We earlier eliminated ownership if we are not compiling the stdlib. Now
// handle the stdlib functions.
P.addNonTransparentFunctionOwnershipModelEliminator();

addFunctionPasses(P, OptimizationLevelKind::HighLevel);

addHighLevelLoopOptPasses(P);
Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/copyforward_ossa.sil
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ sil [ossa] @_TFSq4someU__fMGSqQ__FQ_GSqQ__ : $@convention(thin) <τ_0_0> (@in τ

sil [ossa] @_TFsoi2neU__FTGSqQ__Vs26_OptionalNilComparisonType_Sb : $@convention(thin) <τ_0_0> (@in Optional<τ_0_0>, _OptionalNilComparisonType) -> Bool

// CHECK-LABEL: sil hidden [ossa] @option_init :
// CHECK-LABEL: sil hidden [ossa] @option_init
// CHECK: alloc_stack
// CHECK: alloc_stack
// CHECK: alloc_stack
Expand Down