Skip to content

CSE: While optimizing lazy property getters, don't inline non-ossa to ossa function #38184

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
Jul 1, 2021

Conversation

meg-gupta
Copy link
Contributor

Fixes rdar://79781904

@meg-gupta meg-gupta requested a review from eeckstein June 30, 2021 23:08
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta
Copy link
Contributor Author

@swift-ci test source compatibility

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, thanks!

@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test

@meg-gupta
Copy link
Contributor Author

Windows build failure is unrelated to this change

Failed Tests (1):
Swift(windows-x86_64) :: Demangle/recursion-limit.swift

Also full testing passed before I force pushed with an insignificant difference. Merging this.

@meg-gupta meg-gupta merged commit 7a35c47 into swiftlang:main Jul 1, 2021
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Jul 2, 2021
…ssa to ossa function

Fixes rdar://79781904

Cherry-pick of swiftlang#38184

• Explanation: Fixes a bug in optimizing lazy property getters in CSE. Lazy property getters are CSE'ed by inlining their function body. There was no check to skip inlining a non-ossa function into an ossa function which is illegal.

• Scope of Issue: Can lead to crashes or miscompilations

• Risk: Low. The fix is low risk because it is just avoiding the illegal CSE of lazy property getters.

• Reviewed By: Erik Eckstein

• Testing: Added unit tests
meg-gupta added a commit that referenced this pull request Jul 6, 2021
…ssa to ossa function (#38231)

Fixes rdar://79781904

Cherry-pick of #38184

• Explanation: Fixes a bug in optimizing lazy property getters in CSE. Lazy property getters are CSE'ed by inlining their function body. There was no check to skip inlining a non-ossa function into an ossa function which is illegal.

• Scope of Issue: Can lead to crashes or miscompilations

• Risk: Low. The fix is low risk because it is just avoiding the illegal CSE of lazy property getters.

• Reviewed By: Erik Eckstein

• Testing: Added unit tests
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