Skip to content

Some small optimizer tweaks #42191

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 3 commits into from
Apr 6, 2022
Merged

Conversation

eeckstein
Copy link
Contributor

  • SimplifyGlobalValue: handle fix_lifetime instruction
  • BasicCalleeAnalysis: improve finding the actual called deinits of a destroy/release instruction
  • FunctionOrder: consider destructor calls for destroy_value

These small improvements are a preparation for the new escape analysis (#39438) - and will be mostly tested by that changes.

…estroy/release instruction

* C++: add a function `getDestructors(SILType type, bool isExactType)’: if the type is a final class or `isExactType` is true, then return the one and only destructor of that class.
* swift: add `getDestructor(ofExactType type: Type)` and `getIncompleteCallees`
* swift: remove `getDestructor` from the PassContext. The API of the `calleeAnalysis` can be used instead.
We already do this for `strong_release` and `release_value`, but `destroy_value` was missing
@eeckstein
Copy link
Contributor Author

@swift-ci test

@eeckstein
Copy link
Contributor Author

@swift-ci benchmark

@eeckstein
Copy link
Contributor Author

@swift-ci smoke test macos

@eeckstein eeckstein merged commit b952184 into swiftlang:main Apr 6, 2022
@eeckstein eeckstein deleted the small-optimizer-tweaks branch April 6, 2022 07:25
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