Add a llvm.copysign intrinsic
[oota-llvm.git] / docs / CommandGuide / llvm-prof.rst
1 llvm-prof - print execution profile of LLVM program
2 ===================================================
3
4
5 SYNOPSIS
6 --------
7
8
9 **llvm-prof** [*options*] [*bitcode file*] [*llvmprof.out*]
10
11
12 DESCRIPTION
13 -----------
14
15
16 The **llvm-prof** tool reads in an *llvmprof.out* file (which can
17 optionally use a specific file with the third program argument), a bitcode file
18 for the program, and produces a human readable report, suitable for determining
19 where the program hotspots are.
20
21 This program is often used in conjunction with the *utils/profile.pl*
22 script.  This script automatically instruments a program, runs it with the JIT,
23 then runs **llvm-prof** to format a report.  To get more information about
24 *utils/profile.pl*, execute it with the **-help** option.
25
26
27 OPTIONS
28 -------
29
30
31
32 **--annotated-llvm** or **-A**
33
34  In addition to the normal report printed, print out the code for the
35  program, annotated with execution frequency information. This can be
36  particularly useful when trying to visualize how frequently basic blocks
37  are executed.  This is most useful with basic block profiling
38  information or better.
39
40
41
42 **--print-all-code**
43
44  Using this option enables the **--annotated-llvm** option, but it
45  prints the entire module, instead of just the most commonly executed
46  functions.
47
48
49
50 **--time-passes**
51
52  Record the amount of time needed for each pass and print it to standard
53  error.
54
55
56
57
58 EXIT STATUS
59 -----------
60
61
62 **llvm-prof** returns 1 if it cannot load the bitcode file or the profile
63 information. Otherwise, it exits with zero.