-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Propagate Clang types through SIL #29239
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
Propagate Clang types through SIL #29239
Conversation
The commits are showing in the wrong order again 🤦♂ |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@swift-ci please test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There is a compilation failure as I forgot to update some command line tools like sil-opt. I've fixed that locally pretty easily but there seem to be some crashes compiling the overlays. Looking into those right now. |
There were several bugs:
@swift-ci please smoke test If this works, we can run the big tests etc. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@swift-ci please clean test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Ah the problem is LLDB fails to compile. Let me fix that. 😢 |
This is needed before we can store Clang types in SILFunctionType.
Hopefully, this helps us debug Clang type mismatches better.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
@swift-ci please test |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment but otherwise LGTM
@@ -3917,6 +3917,24 @@ namespace Lowering { | |||
class TypeConverter; | |||
}; | |||
|
|||
class SILUncommonInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very generic name for such a specific type. Can it be made a nested type of SILFunctionType
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried that earlier, but the template argument in SILFunctionType
's TrailingObjects
needs the type to be complete. I suspect SILParameterInfo
and SILResultInfo
have been defined separately instead of as nested inside for a similar reason.
Maybe I should rename it to SILCallingConvUncommonInfo
or something else which is more precise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me merge this for now, since I don't want to rerun coordinated testing with LLDB again, and this makes doing follow-up work easier. I will change the name in a new PR which can be Swift-only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. SILFunctionTypeUncommonInfo
seems reasonable.
See also: swiftlang/swift#29239 (cherry picked from commit fe48ff1)
First commit is from #29210.This PR allows us to use the Clang type in IRGen going forward.