Skip to content

ArrayElementValuePropagation: require that the initialization and element-get are in the same block for non-trivial values. #77610

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 15, 2024

Conversation

eeckstein
Copy link
Contributor

In OSSA we only insert a copy_value of the element at the array initialization point. This would result in an over-consume if the getElement is in a loop. Therefore require that both semantic calls are in the same block.

Fixes an ownership verifier crash when OSSA modules are enabled.

…ment-get are in the same block for non-trivial values.

In OSSA we only insert a copy_value of the element at the array initialization point.
This would result in an over-consume if the getElement is in a loop.
Therefore require that both semantic calls are in the same block.

Fixes an ownership verifier crash.
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein eeckstein merged commit 972ac6f into swiftlang:main Nov 15, 2024
6 checks passed
@eeckstein eeckstein deleted the fix-array-element-propagation branch November 15, 2024 06:53
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