Man page - llvm-opt-report-21(1)
Packages contas this manual
- bugpoint-21(1)
- llvm-tli-checker-21(1)
- llvm-config-21(1)
- llvm-ar-21(1)
- llvm-symbolizer-21(1)
- llvm-diff-21(1)
- llvm-test-mustache-spec-21(1)
- llvm-strings-21(1)
- llvm-dwarfdump-21(1)
- llvm-install-name-tool-21(1)
- clang-tblgen-21(1)
- llvm-as-21(1)
- llvm-tblgen-21(1)
- llvm-stress-21(1)
- llvm-reduce-21(1)
- llvm-libtool-darwin-21(1)
- lldb-tblgen-21(1)
- llvm-cxxmap-21(1)
- mlir-tblgen-21(1)
- llvm-nm-21(1)
- llvm-objcopy-21(1)
- llvm-readelf-21(1)
- llvm-pdbutil-21(1)
- llvm-dis-21(1)
- llvm-ranlib-21(1)
- llvm-ifs-21(1)
- llvm-exegesis-21(1)
- llvm-profgen-21(1)
- llvm-cgdata-21(1)
- llvm-cxxfilt-21(1)
- llvm-mca-21(1)
- llvm-readobj-21(1)
- llvm-cov-21(1)
- llvm-locstats-21(1)
- llvm-debuginfo-analyzer-21(1)
- opt-21(1)
- llvm-mc-21(1)
- llc-21(1)
- llvm-otool-21(1)
- llvm-lib-21(1)
- lit-21(1)
- tblgen-21(1)
- llvm-size-21(1)
- llvm-bcanalyzer-21(1)
- llvm-link-21(1)
- llvm-extract-21(1)
- llvm-rtdyld-21(1)
- llvm-addr2line-21(1)
- llvm-opt-report-21(1)
- llvm-objdump-21(1)
- dsymutil-21(1)
- llvm-strip-21(1)
- llvm-dwarfutil-21(1)
- llvm-remarkutil-21(1)
- llvm-lipo-21(1)
- llvm-profdata-21(1)
apt-get install llvm-21
Manual
| LLVM-OPT-REPORT(1) | LLVM | LLVM-OPT-REPORT(1) |
NAME
llvm-opt-report - generate optimization report from YAML
SYNOPSIS
llvm-opt-report [options] [input]
DESCRIPTION
llvm-opt-report is a tool to generate an optimization report from YAML optimization record files.
You need to create an input YAML optimization record file before running llvm-opt-report.
It provides information on the execution time, memory usage, and other details of each optimization pass.
$ clang -c foo.c -o foo.o -O3 -fsave-optimization-record
Then, you create a report using the llvm-opt-report command with the YAML optimization record file foo.opt.yaml as input.
$ llvm-opt-report foo.opt.yaml -o foo.lst
foo.lst is the generated optimization report.
< foo.c
1 | void bar();
2 | void foo() { bar(); }
3 |
4 | void Test(int *res, int *c, int *d, int *p, int n) {
5 | int i;
6 |
7 | #pragma clang loop vectorize(assume_safety)
8 V4,1 | for (i = 0; i < 1600; i++) {
9 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; 10 | } 11 | 12 U16 | for (i = 0; i < 16; i++) { 13 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i]; 14 | } 15 | 16 I | foo(); 17 | 18 | foo(); bar(); foo();
I | ^
I | ^ 19 | } 20 |
Symbols printed on the left side of the program indicate what kind of optimization was performed. The meanings of the symbols are as follows:
- I: The function is inlined.
- U: The loop is unrolled. The following number indicates the unroll factor.
- V: The loop is vectorized. The following numbers indicate the vector length and the interleave factor.
NOTE:
OPTIONS
If input is “-” or omitted, llvm-opt-report reads from standard input. Otherwise, it will read from the specified filename.
If the -o option is omitted, then llvm-opt-report will send its output to standard output. If the -o option specifies “-”, then the output will also be sent to standard output.
- --help
- Display available options.
- --version
- Display the version of this program.
- --format=<string>
- The format of the optimization record file. The Argument is one of the following:
- yaml
- bitstream
- --no-demangle
- Do not demangle function names.
- -o=<string>
- Output file.
- -r=<string>
- Root for relative input paths.
- -s
- Do not include vectorization factors, etc.
EXIT STATUS
llvm-opt-report returns 0 on success. Otherwise, an error message is printed to standard error, and the tool returns 1.
AUTHOR
Maintained by the LLVM Team (https://llvm.org/).
COPYRIGHT
2003-2025, LLVM Project
| 2025-12-21 | 15 |