Skip to content

Don't inline non-ossa function into an ossa function in mandatory inlining #68150

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
Aug 26, 2023

Conversation

meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Aug 25, 2023

Update the inliner with this check.
Inlining non-ossa into ossa can causes unexpected consequences.

Fixes rdar://114466605

@meg-gupta
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@nate-chandler nate-chandler left a comment

Choose a reason for hiding this comment

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

LGTM!

@meg-gupta meg-gupta changed the title Don't inline non-ossa function into an ossa function in the new mandatory performance opts Don't inline non-ossa function into an ossa function in mandatory inlining Aug 26, 2023
…ining

Update the inliner with this check.
Inlining non-ossa into ossa can causes unexpected consequences.

Fixes rdar://114466605
@meg-gupta
Copy link
Contributor Author

@swift-ci smoke test and merge

if apply.parentFunction.hasOwnership && !callee.hasOwnership {
// Cannot inline a non-ossa function into an ossa function
return false
}
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to make this check in OptUtils.swift: FullApplySite.canInline

@swift-ci swift-ci merged commit 4e4e047 into swiftlang:main Aug 26, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Nov 1, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Nov 2, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Dec 6, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Dec 7, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Dec 8, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Dec 11, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Dec 12, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Dec 13, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Dec 14, 2023
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Jan 6, 2024
meg-gupta added a commit to meg-gupta/swift that referenced this pull request Jan 8, 2024
Catfish-Man pushed a commit to Catfish-Man/swift that referenced this pull request Jan 19, 2024
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.

4 participants