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

Joel E. Denny via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 11 16:34:35 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));
----------------
jdenny-ornl wrote:

Done.

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


More information about the llvm-commits mailing list