Skip to content

PMOpt refactoring before big changes #12780

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

Merged
merged 6 commits into from
Nov 6, 2017

Conversation

gottesmm
Copy link
Contributor

@gottesmm gottesmm commented Nov 6, 2017

This PR contains a bunch of changes that are all NFC that I was able to split off from the larger commit that updates PMOpt for ownership. This will enable us to separate the adding/validation of new functionality from the necessary refactoring which will ease committing this into tree.

rdar://31521023

These APIs make it easy to create borrow/end_borrow operations in a pass that
has to handle both ownership and non-ownership SIL.

rdar://31521023
In non-ownership SIL, PMOpt did not need to distinguish in between destructive
and non-destructive sub element extraction. This allowed PMOpt to just use the
"non-destructive" sub element (i.e. extractSubElement) everywhere. In
preparation for introducing this distinction (and a destructive sub element
extractor), rename extractSubElement to be nonDestructivelyExtractSubElement for
clarity.

NFC.

rdar://31521023
…thod flow better when read.

NFC.

rdar://31521023
This is in preparation for adding the distinction of destructive vs
non-destructive extracts.

NFC.

rdar://31521023
This is to ensure that when I add the destructive code when ownership is
enabled, the non-ownership variant doesn't break. I have to move the rest of the
pipeline to -Onone at the same time. Once that is done, I will remove more code.

NFC.

rdar://31521023
@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 6, 2017

@swift-ci test

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 6, 2017

@swift-ci test source compatibility suite

@gottesmm
Copy link
Contributor Author

gottesmm commented Nov 6, 2017

@swift-ci test source compatibility

@gottesmm gottesmm merged commit a0483e9 into swiftlang:master Nov 6, 2017
@gottesmm gottesmm deleted the pmopt_before_big_changes branch November 6, 2017 22:38
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