[all-commits] [llvm/llvm-project] bd81ac: [WIP][AMDGPU] Improve the handling of `inreg` argu...
Shilei Tian via All-commits
all-commits at lists.llvm.org
Thu Apr 3 21:05:13 PDT 2025
Branch: refs/heads/users/shiltian/inreg-vgpr-improvement
Home: https://github.com/llvm/llvm-project
Commit: bd81ac3d92852c38f74e405808bc34e94727b2fe
https://github.com/llvm/llvm-project/commit/bd81ac3d92852c38f74e405808bc34e94727b2fe
Author: Shilei Tian <i at tianshilei.me>
Date: 2025-04-04 (Fri, 04 Apr 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/lib/Target/AMDGPU/SIISelLowering.h
A llvm/test/CodeGen/AMDGPU/inreg-vgpr-spill.ll
Log Message:
-----------
[WIP][AMDGPU] Improve the handling of `inreg` arguments
When SGPRs available for `inreg` argument passing run out, the compiler silently
falls back to using whole VGPRs to pass those arguments. Ideally, instead of
using whole VGPRs, we should pack `inreg` arguments into individual lanes of
VGPRs.
This PR introduces `InregVGPRSpiller`, which handles this packing. It uses
`v_writelane` at the call site to place `inreg` arguments into specific VGPR
lanes, and then extracts them in the callee using `v_readlane`.
Fixes #130443 and #129071.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list