[llvm] [KernelInfo] Implement new LLVM IR pass for GPU code analysis (PR #102944)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 10:32:44 PDT 2024


================
@@ -781,6 +782,15 @@ void AMDGPUTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB) {
           return onlyAllocateVGPRs;
         return nullptr;
       });
+
+  if (KernelInfoEndLTO) {
+    PB.registerFullLinkTimeOptimizationLastEPCallback(
+        [this](ModulePassManager &PM, OptimizationLevel Level) {
+          FunctionPassManager FPM;
+          FPM.addPass(KernelInfoPrinter(this));
----------------
arsenm wrote:

There's already a registerFullLinkTimeOptimizationLastEPCallback call above, move this into it 

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


More information about the llvm-commits mailing list