-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[SR-13903] Make ApplyInst
a MultipleValueInstruction
#56301
Comments
@swift-ci create |
Comment by Sachin Vas (JIRA) theindigamer (JIRA User) Anyone working on this? Should I pick it up? |
I don't think anyone is, feel free to assign it to yourself (see Assignee field in top right of web UI) and work on it. 🙂 |
I think this change will need to be broken up into at least 2 PRs. See https://forums.swift.org/t/make-applyinst-a-multiplevalueinstruction/42294/3 for context. |
Comment by Saidhon Orifov (JIRA) @dan-zheng theindigamer (JIRA User) based on my understanding from the forum, this has 2 parts to it, which will need to be broken down into 2 PR's:
|
Comment by Sachin Vas (JIRA) saidhon (JIRA User) Are you working on this issue? |
sachinvas16 (JIRA User): I'll go ahead and assign you to this issue, if you'd like to get started! As Varun said, you have the ability to assign yourself. Please do so in the future. Please also change the issue status to "In Progress" after you do get started. This communicates to everyone that active progress is being made by you and that we can expect to see some PR within a few days or weeks. Certainly do not hesitate to ask questions (even small ones) if you get stuck, there are many experts here to help. Hope this makes sense, thanks! |
Comment by Sachin Vas (JIRA) Thank you @dan-zheng, will get started ASAP. |
Thanks for the quick reply! I'm excited to see your progress 🙂 |
Comment by Saidhon Orifov (JIRA) sachinvas16 (JIRA User) Yeah, but I yield back, feel free to take over. Sorry, I got started on it but never assigned it to myself or saw your comments. |
Additional Detail from JIRA
md5: 41f0f57e0ecea221993e51084b3f1975
Issue Description:
Forum question with context: https://forums.swift.org/t/make-applyinst-a-multiplevalueinstruction/42294
SIL supports instructions that return multiple values (i.e. multiple result {{SILValue}}s).
However,
apply
instructions don't return multiple values. Instead, they produce a single value, which may have a tuple type. This leads to much avoidable destructuring and restructuring of tuples, which complicates SIL transformations like autodiff:Instead, we can change
ApplyInst
to inheritMultipleResultInstruction
.Steps:
1. Change definition: make
ApplyInst
inheritMultipleValueInstruction
.Fix obvious compilation errors in the compiler codebase. Fix as many tests as possible.
2. Update and fix
ApplyInst
users: SIL generation + parsing + verification + printing, analyses and transformations, IRGen.The text was updated successfully, but these errors were encountered: