mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This pass lowers moveonly-ness from the IR after we have finished move only checking. The transform can be configured in two ways: such that it only handles trivial types and such that it does trivial and non-trivial types. For ease of use, I created two top level transforms (TrivialMoveOnlyTypeEliminator and MoveOnlyTypeElimintor) that invoke the two behaviors by configuring the underlying transform slightly differently. For now, I am running first the trivial-only and then the all of the above lowering. The trivial only pass will remain at this part of the pipeline forever, but with time we are going to move the lower everything pass later into the pipeline once I have audited the optimizer pipeline to just not perform any work on move only types. That being said, currently we do not have this guarantee and this patch at least improves the world and lets us codegen no implicit copy code again.
55 KiB
55 KiB