[llvm] [AMDGPU] Make AMDGPULowerKernelArguments a module pass (PR #112790)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 8 06:44:59 PST 2024


================
@@ -1170,8 +1166,7 @@
 ; GCN-O3-NEXT:    CallGraph Construction
 ; GCN-O3-NEXT:    Call Graph SCC Pass Manager
 ; GCN-O3-NEXT:      AMDGPU Annotate Kernel Features
-; GCN-O3-NEXT:      FunctionPass Manager
-; GCN-O3-NEXT:        AMDGPU Lower Kernel Arguments
+; GCN-O3-NEXT:    AMDGPU Lower Kernel Arguments
----------------
arsenm wrote:

I thought you were moving the preload logic to the attributor? This probably belongs in the attributor, or a separate CGSCC/CGSCC-in-module pass.

This does not feel like it belongs in AMDGPULowerKernelArguments. AMDGPULowerKernelArguments is at least a 50% hack due to clang emitting sub-optimal kernel signatures to begin with (which #115821 will soon give us a path forward to fixing). The other piece is it enables vectorization of kernel argument loads, which will not go away. In either case, its only job is to rewrite argument references in terms of a base pointer. It shouldn't need to consider the use context like preload should 

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


More information about the llvm-commits mailing list