<div dir="ltr">ninja, MSVC compiler, MSVC linker, Windows 10, 48 logical cores, 64GB ram.</div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 30, 2017 at 2:00 PM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, May 30, 2017 at 1:50 PM Zachary Turner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, May 30, 2017 at 12:52 PM Bob Haarman <<a href="mailto:llvm@inglorion.net" target="_blank">llvm@inglorion.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u><div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif"><div>I would like to better understand how you came to conclude that the tablegen re-runs based on changes in Support are what's causing your build to be slow and what part specifically is taking all that time. I can do a clean release + assertions build of LLVM, Clang, compiler-rt and lld in about 5 minutes, plus 40 seconds to run cmake, on what I think is similar hardware to what Zach is using. If I swap Ptr += ret and Size -= Ret in raw_fd_ostream::write_impl so that Support changes, I can do an incremental build in about 10 seconds, including the regeneration of various .inc files. How do we get from there to 10 minutes for an incremental build?</div></div></div></blockquote><div><br></div></div></div><div dir="ltr"><div class="gmail_quote"><div>For the sake of comparison, I made the same change and it took  1:58.39.  A slightly different but more intrusive change to Format.h in format_object_base::print() took 5:6.54.  A clean build on the same machine takes about 12 minutes.</div></div></div></blockquote></div></div><div dir="ltr"><div class="gmail_quote"><div><br>Changing the header seems liable to rebuild a bunch of things that include the header - not sure any layering changes would change that, would they? (I don't think ninja at least waits for the library to build before building things that include the library's headers)<br><br>Out of curiosity - what build system/linker/host compiler/OS are you using? (& cores/ram/etc too)<br> </div></div></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>I tried a few hacks to the CMake to say "don't run tablegen, no matter what, and don't make anything depend on tablegen's output", but I couldn't come up with the right magic.  If anyone knows, I can test a side-by-side comparison without tablegen.</div></div></div></blockquote></div></div><div dir="ltr"><div class="gmail_quote"><div><br>That's why I made an equivalent change above tablegen to see what the relative cost was - I think that's probably pretty representative. Without tablegen touching any cpp file should (& with ninja, seems to) rebuild that object, the library, and the resulting binary & not much/anything else.<br><br>- Dave<br> </div></div></div><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">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>
</blockquote></div></div></blockquote></div>