Skip to content

Conversation

@meg-gupta
Copy link
Contributor

If a function has lifetime dependencies, disable FSO's dead param optimization. Dead params maybe dependency sources and we should not delete them. It is also problematic to dead code params that are not dependency sources, since lifetime dependent sources are stored as indices and deleting dead parameters will require recomputation of these indices.

@meg-gupta meg-gupta requested a review from atrick July 10, 2025 14:40
@meg-gupta meg-gupta requested a review from eeckstein as a code owner July 10, 2025 14:40
@meg-gupta
Copy link
Contributor Author

@swift-ci test

1 similar comment
@meg-gupta
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

Thanks for catching this!

@meg-gupta
Copy link
Contributor Author

@swift-ci test windows platform

@meg-gupta meg-gupta merged commit 8e07220 into swiftlang:main Jul 11, 2025
5 checks passed
@eeckstein
Copy link
Contributor

@meg-gupta do we need the same check here, too?

func specializeByRemovingMetatypeArguments(apply: FullApplySite, _ context: ModulePassContext) {

@meg-gupta
Copy link
Contributor Author

@eeckstein Thanks. Addressing here - #83037

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.

3 participants