Skip to content

[Exclusivity] Sink may release release instructions out of access scopes #20201

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 1 commit into from
Nov 1, 2018

Conversation

shajrawi
Copy link

rdar://problem/44121388

General case:
begin_access A
...
strong_release / release_value / destroy
end_access

The release instruction can be sunk below the end_access instruction,
This extends the lifetime of the released value, but, might allow us to
Mark the access scope as no nested conflict.

General case:
begin_access A
...
strong_release / release_value / destroy
end_access

The release instruction can be sunk below the end_access instruction,
This extends the lifetime of the released value, but, might allow us to
Mark the access scope as no nested conflict.
@shajrawi shajrawi requested review from atrick and eeckstein October 31, 2018 22:49
@shajrawi
Copy link
Author

@swift-ci Please test

@shajrawi
Copy link
Author

@atrick , @eeckstein can either one of you please review?

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

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

lgtm!

@shajrawi shajrawi merged commit e3cd69b into swiftlang:master Nov 1, 2018
@shajrawi shajrawi deleted the release-sink branch November 1, 2018 02:14
Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

Nice!

"Did not expect a sinkable instruction at block's end");
// Go back to previous iteration
auto prevIt = reverseIt;
--prevIt;
Copy link
Contributor

Choose a reason for hiding this comment

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

[nit] auto prevIt = std::prev(reverseIt)

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.

3 participants