Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Time Spent in Code Gen

MaggieYingYi edited this page Sep 24, 2020 · 9 revisions

The following charts show the time spent in the "back-end" of LLVM when compiling large projects (Clang+LLVM3.7 and Chrome). Please note: this page is based on the old repo compiler and the old clang. The latest LLVM+Clang performance results could be found in the page Compile-Faster-with-the-Program-Repository-and-ccache.

The llvm-prepo compiler work eliminates the back-end time for functions that are not changed by a user between compilations. These charts show the percentage compilation time reduction if we assume that the llvm-prepo passes themselves add no overhead; this corresponds to the ”speed of light” for the project.

The data in these charts was produced by capturing the output of the "-ftime-report" option, parsing the resulting files and categorizing each entry as "front-end" or "back-end". The build was performed 16 times and the mean timings taken for each source file.

The chart axes show:

  • There is a point on the X axis for each source file.
  • The position on the Y axis shows the ratio of time spent in clang (i.e. the “front-end”) to the time spent in LLVM (the “back-end”) performing optimization and code-generation.

The values are each individually sorted to produce a smooth curve. In other words, the position on the X axis does not reflect the compilation order for these source files.

LLVM

LLVM

Median percentage time in back-end:

Debug Release
51.71 80.50

Chrome

Chrome

Median percentage time in back-end:

Debug Release
60.30 80.62
Clone this wiki locally