05 [Tutorial] An Guide to Performance Debugging LLVM-based Programs

Опубликовано: 12 Октябрь 2024
на канале: LLVM
1,528
28

William Moses
Johannes Doerfert
https://llvm.org/devmtg/2022-04-03/#t...


LLVM is a compiler infrastructure that has become the foundation of a variety of compilers and languages including C/C++, Fortran, Rust, Swift, Julia, and more. When a user of an LLVM-based compiler is writing a program, it is unfortunately and surprisingly easy to shoot one self in the foot and inadvertently write code that prevents optimization.

This talk will provide viewers with an introduction to performance debugging in LLVM, covering a variety of common tools and techniques such as profilers and optimization remarks. This talk will also provide users with the the necessary tools to solve advanced performance engineering mysteries including LLVM optimizations inadvertently not applying to programs. The talk will conclude by discussing two recent performance engineering mysteries that arose on LLVM main: a change to phase ordering that accidentally resulted in LICM needless removing alias and range information (https://github.com/llvm/llvm-project/..., and the increasing importance and ubiquity of hardcoded compiler flags.