[Go] Lower stack ABI inputs with typed byval - #83
Conversation
|
Hello @zhouguangyuan0718 👋 Thank you for submitting a Pull Request (PR) to the LLVM Project. Since this is your first PR, here are a few useful links covering our main contribution policies and review practices.
Please reply to this message to confirm that you have read these policies, especially the LLVM AI Tool Use Policy, and that any AI tool usage has been noted in the PR description. Frequently asked questionsHow do I add reviewers? This PR will be automatically labeled, and the relevant teams will be notified. For some parts of the project, reviewers may also be added automatically. You can also add reviewers manually using the Reviewers section on this page. If you cannot use that section, it is probably because you do not have write permissions for the repository. In that case, you can request a review by tagging reviewers in a comment using What if there are no comments? If you have not received any comments on your PR after a week, you can request a review by pinging the PR with a comment such as “Ping”. The common courtesy ping rate is once a week. Please remember that you are asking for volunteer time from other developers. Are any special GitHub settings required to contribute to LLVM? We only require contributors to have a public email address associated with their GitHub commits, see this section of LLVM Developer Policy for details. If you have questions, feel free to leave a comment on this PR, or ask on LLVM Discord or LLVM Discourse. Thank you, |
b6ace51 to
8bc5a46
Compare
8bc5a46 to
47f6698
Compare
Summary
Large memory results remain a separate goret follow-up. Go frontend integration is intentionally deferred until the LLVM-side follow-up PRs are complete.
Scope boundary
This PR contains no custom SelectionDAG store forwarding, no initializer or escape classifier, and no statepoint optimization for pointers loaded from byval homes.
Existing incoming argument-copy elision now applies only to direct register inputs. Go byval inputs are explicitly excluded and bind their already assigned incoming fixed home instead. Focused AArch64/X86 regressions show that a direct register input may reuse its fixed incoming home while ordinary byval lowering writes the outgoing stack slot, with no extra local stack object.
Pure-SSA aggregate source allocas and their outgoing copies are deliberately left for a separate LLVM optimization PR. Consequently the full LLVM-built runtime closure may temporarily grow frames enough to hit a nosplit limit, and compress/flate still reaches its existing SelectionDAG assertion. Those are not worked around here.
Validation
No Go PR update is part of this revision.