[llvm] [AMDGPU] Added Downward Propagation for the attribute "amdgpu-agpr-alloc" (PR #208847)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 05:57:01 PDT 2026
shiltian wrote:
Okay, I spent some time thinking about this issue. I think the approach in this PR will introduce regressions in some cases.
For example, suppose we have `K1 -> F1`, `K1 -> F2`, and `K2 -> F2`. `F1` has `amdgpu-agpr-alloc`, but `F2` doesn't. Without this PR, `K1` gets `amdgpu-agpr-alloc` because it calls `F1`.
With this PR, the attribute is also propagated downward, so `F2` will get it. Then, because `F2` now has the attribute, the upward propagation causes `K2` to get it as well, even though neither `F2` nor `K2` actually needs it.
I don't have a concrete solution, but I feel that the current propagation of `amdgpu-agpr-alloc` is only a partial solution. What we also need is a way to tell the backend that a function's VGPR budget should be reduced by X. I don't think we have a mechanism to express that today.
https://github.com/llvm/llvm-project/pull/208847
More information about the llvm-commits
mailing list