<div dir="ltr"><div>In case someone finds it useful, this is some indication of the breakdown of where time is spent during a build of Clang.</div><div><br></div><div>tl;dr: in Debug+Asserts about 10% of time is spent in the backend and in Release without asserts (and without debug info IIRC) about 33% of time is spent in the backend.</div><div><br></div><div><br class="">These are the charts I collected a while back breaking down the time it takes clang to compile itself.</div><div>See the thread "[cfe-dev] Some DTrace probes for measuring per-file time" for how I collected this information. The raw data is basically aggregated CPU time spent textually parsing each header (and IRGen'ing them, since clang does that as it parses. There are also a couple "phony" headers to cover stuff like the backend/optimizer.</div><div><br></div><div>Since there a large number of files, the pie charts below are grouped into rough categories. E.g. the "llvm headers" includes the time spent on include/llvm/Support/raw_ostream.h and all other headers in include/llvm. The "libc++" pie slice contains the time spent in the libc++ system headers (this data was collected on a mac, so libc++ was the C++ standard library). "system" are C system headers.</div><div><br></div><div>All time spent inside the LLVM optimizer is in the "after parsing" pie slice.</div><div><br></div><div><br></div><div>Debug with asserts:</div><div><br></div><div><br></div><div><img src="cid:ii_15357a600e446627" alt="Inline image 1" width="562" height="512"><br></div><div><br></div><div><br></div><div><br></div><div>Release without asserts (and without debug info IIRC):</div><div><br></div><div><br></div><div><img src="cid:ii_15357a623000443d" alt="Inline image 2" width="562" height="532"><br></div><div><br></div><div><br></div><div><br></div><div>-- Sean Silva</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 8, 2016 at 8:13 AM, Rafael EspĂ­ndola <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have just benchmarked building trunk llvm and clang in Debug,<br>
Release and LTO modes (see the attached scrip for the cmake lines).<br>
<br>
The compilers used were clang 3.5, 3.6, 3.7, 3.8 and trunk. In all<br>
cases I used the system libgcc and libstdc++.<br>
<br>
For release builds there is a monotonic increase in each version. From<br>
163 minutes with 3.5 to 212 minutes with trunk. For comparison, gcc<br>
5.3.2 takes 205 minutes.<br>
<br>
Debug and LTO show an improvement in 3.7, but have regressed again in 3.8.<br>
<br>
Cheers,<br>
Rafael<br>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>