Skip to content

Commit 86b4682

Browse files
authored
Merge pull request #41071 from gottesmm/pr-b273bb7d8a0817065f099d4e76915e1ceb6eff0c
[move-only] Move move function kills values checking and move only value lifetime checking before diagnostic constant prop.
2 parents 9e93369 + 0032b38 commit 86b4682

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ static void addMandatoryDiagnosticOptPipeline(SILPassPipelinePlan &P) {
157157
// SSA based diagnostics.
158158
P.addPredictableMemoryAccessOptimizations();
159159

160+
// Now that we have promoted simple loads for SSA based diagnostics, perform
161+
// SSA based move function checking and no implicit copy checking.
162+
P.addMoveKillsCopyableValuesChecker(); // No uses after _move of copyable
163+
// value.
164+
P.addMoveOnlyChecker(); // Check noImplicitCopy isn't copied.
165+
160166
// This phase performs optimizations necessary for correct interoperation of
161167
// Swift os log APIs with C os_log ABIs.
162168
// Pass dependencies: this pass depends on MandatoryInlining and Mandatory
@@ -173,11 +179,6 @@ static void addMandatoryDiagnosticOptPipeline(SILPassPipelinePlan &P) {
173179
// dead allocations.
174180
P.addPredictableDeadAllocationElimination();
175181

176-
// Now perform move semantic checking.
177-
P.addMoveKillsCopyableValuesChecker(); // No uses after _move of copyable
178-
// value.
179-
P.addMoveOnlyChecker(); // Check noImplicitCopy isn't copied.
180-
181182
// Now that we have finished performing diagnostics that rely on lexical
182183
// scopes, if lexical lifetimes are not enabled, eliminate lexical lfietimes.
183184
if (Options.LexicalLifetimes != LexicalLifetimesOption::On) {

0 commit comments

Comments
 (0)