Skip to content

SIL: support type dependent operands in all cast instructions. #31096

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
Apr 17, 2020

Conversation

eeckstein
Copy link
Contributor

We had this for some cast instructions, but not for cast instructions with address-types.
Type dependent operands - like for dynamic self - are important for establishing a def-use relationship between the instruction/argument which defines the type and the instruction which uses the type.
Missing those dependencies can cause instructions or the dynamic-self argument to be removed while the type is still used in a cast instruction.

This change involved some class hierarchy gymnastics in SILInstruction.h.

Fixes a compiler crash.
rdar://problem/61816506

We had this for some cast instructions, but not for cast instructions with address-types.
Type dependent operands - like for dynamic self - are important for establishing a def-use relationship between the instruction/argument which defines the type and the instruction which uses the type.
Missing those dependencies can cause instructions or the dynamic-self argument to be removed while the type is still used in a cast instruction.

This change involved some class hierarchy gymnastics in SILInstruction.h.

Fixes a compiler crash.
rdar://problem/61816506
@eeckstein
Copy link
Contributor Author

@swift-ci test

@slavapestov
Copy link
Contributor

Oops, this was my fault I think. Thank you!

@eeckstein eeckstein merged commit ec9afec into swiftlang:master Apr 17, 2020
@eeckstein eeckstein deleted the fix-casts branch April 17, 2020 18:03
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