Skip to content

[SIL] BuiltinInsts have type dependent operands. #77291

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
Oct 31, 2024

Conversation

nate-chandler
Copy link
Contributor

Collect all types in the substitution map which constitute type-dependent operands and record them in the instruction's operand list. Fixes a bug where open_existential_metatype (e.g.) is deleted as dead because it has no users even when the type it defines is used in a substitution map of a builtin.

It has a module or maybe a function.  In the future we may want to
change this to be either a SILFunction or a SILGlobalVariable.
Take a SILInstructionContext instead of a SILFunction because the latter
isn't always available.
Collect all types in the substitution map which constitute
type-dependent operands and record them in the instruction's operand
list.  Fixes a bug where open_existential_metatype (e.g.) is deleted as
dead because it has no users even when the type it defines is used in a
substitution map of a builtin.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test source compatibility

@nate-chandler
Copy link
Contributor Author

@swift-ci please apple silicon benchmark

@nate-chandler nate-chandler requested review from atrick, eeckstein and meg-gupta and removed request for jckarter October 30, 2024 04:47
Copy link
Contributor

@drexin drexin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@Azoy Azoy left a comment

Choose a reason for hiding this comment

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

Thank you for tracking this down!

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@nate-chandler nate-chandler merged commit 20dd837 into swiftlang:main Oct 31, 2024
8 checks passed
@nate-chandler nate-chandler deleted the bug/20241029/1 branch October 31, 2024 01:02
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