Skip to content

[Runtime] Don't write to rodata if values already match. #34616

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 10, 2020

Conversation

mikeash
Copy link
Contributor

@mikeash mikeash commented Nov 6, 2020

initClassFieldOffsetVector writes the instanceStart and size to the class's rodata. In some cases they already match, and this write will dirty memory unnecessarily, and prevent the compiler from emitting those rodatas into read-only memory.

rdar://problem/71119533

initClassFieldOffsetVector writes the instanceStart and size to the class's rodata. In some cases they already match, and this write will dirty memory unnecessarily, and prevent the compiler from emitting those rodatas into read-only memory.

rdar://problem/71119533
@mikeash mikeash requested a review from slavapestov November 6, 2020 22:01
@mikeash
Copy link
Contributor Author

mikeash commented Nov 6, 2020

@swift-ci please test

@mikeash
Copy link
Contributor Author

mikeash commented Nov 9, 2020

@swift-ci please test windows platform

@mikeash
Copy link
Contributor Author

mikeash commented Nov 10, 2020

Thanks Slava!

@mikeash mikeash merged commit 5a8b1ae into swiftlang:main Nov 10, 2020
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.

2 participants