NAME

llvm-prof - print execution profile of LLVM program


SYNOPSIS

llvm-prof [options] [bitcode file] [llvmprof.out]


DESCRIPTION

The llvm-prof tool reads in an llvmprof.out file (which can optionally use a specific file with the third program argument), a bitcode file for the program, and produces a human readable report, suitable for determining where the program hotspots are.

This program is often used in conjunction with the utils/profile.pl script. This script automatically instruments a program, runs it with the JIT, then runs llvm-prof to format a report. To get more information about utils/profile.pl, execute it with the -help option.


OPTIONS

What's an uglygep?

Some LLVM optimizers operate on GEPs by internally lowering them into more primitive integer expressions, which allows them to be combined with other integer expressions and/or split into multiple separate integer expressions. If they've made non-trivial changes, translating back into LLVM IR can involve reverse-engineering the structure of the addressing in order to fit it into the static type of the original first operand. It isn't always possibly to fully reconstruct this structure; sometimes the underlying addressing doesn't correspond with the static type at all. In such cases the optimizer instead will emit a GEP with the base pointer casted to a simple address-unit pointer, using the name "uglygep". This isn't pretty, but it's just as valid, and it's sufficient to preserve the pointer aliasing guarantees that GEP provides.