aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELFObjectFile.cpp
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2025-01-29 12:40:19 -0500
committerGitHub <noreply@github.com>2025-01-29 12:40:19 -0500
commit18f8106f310ee702046a11f360af47947c030d2e (patch)
treea04d3ede228437f82f541890ae0ebe59dc18977d /llvm/lib/Object/ELFObjectFile.cpp
parent15412d735a4f3e85b1c68025ca28d5671fde7b47 (diff)
downloadllvm-18f8106f310ee702046a11f360af47947c030d2e.zip
llvm-18f8106f310ee702046a11f360af47947c030d2e.tar.gz
llvm-18f8106f310ee702046a11f360af47947c030d2e.tar.bz2
[KernelInfo] Implement new LLVM IR pass for GPU code analysis (#102944)
This patch implements an LLVM IR pass, named kernel-info, that reports various statistics for codes compiled for GPUs. The ultimate goal of these statistics to help identify bad code patterns and ways to mitigate them. The pass operates at the LLVM IR level so that it can, in theory, support any LLVM-based compiler for programming languages supporting GPUs. It has been tested so far with LLVM IR generated by Clang for OpenMP offload codes targeting NVIDIA GPUs and AMD GPUs. By default, the pass runs at the end of LTO, and options like ``-Rpass=kernel-info`` enable its remarks. Example `opt` and `clang` command lines appear in `llvm/docs/KernelInfo.rst`. Remarks include summary statistics (e.g., total size of static allocas) and individual occurrences (e.g., source location of each alloca). Examples of its output appear in tests in `llvm/test/Analysis/KernelInfo`.
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions