[llvm] [AMDGPU] Move kernarg preload logic to AMDGPU Attributor (PR #123547)

Austin Kerbow via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 07:48:52 PST 2025


kerbowa wrote:

> > Which parts are you thinking should move
> 
> IMHO things that don't run as part of attributor should not stay in this file.
> 
> > I think everything should move there including the kernel inreg stuff?
> 
> Yes, because for now it is not running as part of attributor iterations.
> 
> > Eventually it may be possible to do some optimization where we drop the kernarg segment pointer or other optimization in callees related to kernel arguments that requires attributor iterations.
> 
> For now probably a TODO mentioning some logic can be moved to attributor. I assume we can move them after #101609 is landed.
> 
> If I read @arsenm 's comment in #112790 correctly, half of the pass will go after #115821 is landed, and the pre load stuff is not really related to the pass itself. Moving it out to a separate module pass is an option.

My only concern is that some of the logic calculating offsets and such would need to be duplicated if some functionality did end up moving back to the attributor. I could create a common interface though. I would like Matt's opinion.

https://github.com/llvm/llvm-project/pull/123547


More information about the llvm-commits mailing list