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

Austin Kerbow via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 10 13:38:34 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
----------------
kerbowa wrote:

I've made this change. I'm worried that this leaves the SCC in an inconsonant state, although it works. It breaks if I try to remove any functions outside of finalization.

There are 3 other options. Was wondering if you have any opinion on the best one.
1. Module pass
2. Keep it a function pass and do all the preload stuff in the doInitialization callback
3. Make the preloading stuff a separate module pass and keep lowerkernelarguments a function pass
4. CGSCC pass

I'm leaning towards option 3 personally.

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


More information about the llvm-commits mailing list