Skip to content

[move-function] Implement move function support for address only vars. #40453

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

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Dec 7, 2021

I have to make a few other changes to make this work for loadable vars, but I
wanted to get this in.

Behind a flag.

@gottesmm gottesmm requested a review from atrick December 7, 2021 20:02
I have to make a few other changes to make this work for loadable vars, but I
wanted to get this in.

Behind a flag.
@gottesmm gottesmm force-pushed the pr-a85fbe6f331638d8fc105031e934d0516c72122f branch from e5b8714 to 2e018af Compare December 7, 2021 20:03
// Var //
/////////

public func performMoveOnVar<T>(_ p: T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deleted this since I am making separate test files for lets/vars since they are different use cases and are handled slightly differently.

@gottesmm
Copy link
Contributor Author

gottesmm commented Dec 7, 2021

Just to provide a little bit of context, I found that when I was looking at the codegen out of SILGen that SILGen was emitting code that used reinitialization via assign like operations (e.x.: store [assign], copy_addr [take]). I had to teach the memory analysis about this to ensure that we stopped propagating moves at that block.

@gottesmm
Copy link
Contributor Author

gottesmm commented Dec 7, 2021

@swift-ci smoke test

@gottesmm gottesmm merged commit 1ed3ce3 into swiftlang:main Dec 8, 2021
@gottesmm gottesmm deleted the pr-a85fbe6f331638d8fc105031e934d0516c72122f branch December 8, 2021 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant