Skip to content

Commit c9ce3a9

Browse files
authored
Merge pull request #63270 from gottesmm/pr-58e55bb70e30107d86e3c437c972c9f0adbce7b4
[move-only] Rather than calling the borrow to destructure transform from the MoveOnlyObjectChecker, make its own pass.
2 parents 39d68a1 + 96140dd commit c9ce3a9

File tree

6 files changed

+1319
-1431
lines changed

6 files changed

+1319
-1431
lines changed

Diff for: include/swift/SILOptimizer/PassManager/Passes.def

+6-3
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,12 @@ PASS(MovedAsyncVarDebugInfoPropagator, "sil-moved-async-var-dbginfo-propagator",
458458
"Propagate debug info from moved async vars after coroutine funclet boundaries")
459459
PASS(MoveOnlyDeinitInsertion, "sil-move-only-deinit-insertion",
460460
"After running move only checking, convert last destroy_values to deinit calls")
461-
PASS(MoveOnlyBorrowToDestructureTransform, "sil-move-only-borrow-to-destructure",
462-
"Utility pass that is used to test the borrow to destructure transform "
463-
"independently of the move only object/address checkers")
461+
PASS(MoveOnlyBorrowToDestructureTransform,
462+
"sil-move-only-borrow-to-destructure",
463+
"Pass that is phased ordered before move only object checking that is "
464+
"used to convert borrow+projection to destructures. Once this has run, the move "
465+
"only object checker runs and ensures that the destructures do not create "
466+
"any move only errors with respect to non-borrow+projection uses")
464467
PASS(PruneVTables, "prune-vtables",
465468
"Mark class methods that do not require vtable dispatch")
466469
PASS_RANGE(AllPasses, AADumper, PruneVTables)

Diff for: lib/SILOptimizer/Mandatory/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ target_sources(swiftSILOptimizer PRIVATE
2929
MoveOnlyDeinitInsertion.cpp
3030
MoveOnlyDiagnostics.cpp
3131
MoveOnlyObjectChecker.cpp
32-
MoveOnlyUtils.cpp
3332
NestedSemanticFunctionCheck.cpp
3433
OptimizeHopToExecutor.cpp
3534
PerformanceDiagnostics.cpp

0 commit comments

Comments
 (0)