Skip to content

Fix -canonical-ossa-rewrite-borrows but leave it disabled. #35481

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
Jan 20, 2021

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Jan 19, 2021

Add support for interleaved borrow scopes:

%b1 = begin_borrow %a
%c = copy
%b2 = begin_borrow %b1
end_borrow %b1
use %c
end_borrow %b2

Will be transformed to:

%c = copy %a
%b1 = begin_borrow %a
%b2 = begin_borrow %b1
end_borrow %b1
use %c
end_borrow %b2

This was the original intention but the implementation was incomplete.

This option can be enabled as soon as we need it for performance.

The intention is also to handle multi-block borrows, but that hasn't
been implemented.

@atrick atrick requested a review from gottesmm January 19, 2021 06:11
@atrick
Copy link
Contributor Author

atrick commented Jan 19, 2021

@swift-ci test

@atrick
Copy link
Contributor Author

atrick commented Jan 19, 2021

@swift-ci test source compatibility

Add support for interleaved borrow scopes:

%b1 = begin_borrow %a
%c = copy
%b2 = begin_borrow %b1
end_borrow %b1
use %c
end_borrow %b2

Will be transformed to:

%c = copy %a
%b1 = begin_borrow %a
%b2 = begin_borrow %b1
end_borrow %b1
use %c
end_borrow %b2

This was the original intention but the implementation was incomplete.

This option can be enabled as soon as we need it for performance.

The intention is also to handle multi-block borrows, but that hasn't
been implemented.
@atrick atrick force-pushed the fix-rewrite-borrows branch from 6f15257 to f509d67 Compare January 20, 2021 03:08
@atrick
Copy link
Contributor Author

atrick commented Jan 20, 2021

@swift-ci smoke test

@atrick atrick merged commit 742ad76 into swiftlang:main Jan 20, 2021
@atrick atrick deleted the fix-rewrite-borrows branch January 20, 2021 05:52
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